Skip to content

Commit

Permalink
Merge pull request #2199 from SchrodingersGat/partial-shipment
Browse files Browse the repository at this point in the history
Create SalesOrderShipment model
  • Loading branch information
SchrodingersGat authored Dec 4, 2021
2 parents 6bc3e3c + 9ec5e39 commit 3f2cdf9
Show file tree
Hide file tree
Showing 40 changed files with 2,585 additions and 656 deletions.
5 changes: 4 additions & 1 deletion InvenTree/InvenTree/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
INVENTREE_SW_VERSION = "0.6.0 dev"

# InvenTree API version
INVENTREE_API_VERSION = 20
INVENTREE_API_VERSION = 21

"""
Increment this API version number whenever there is a significant change to the API that any clients need to know about
v21 -> 2021-12-04
- Adds support for multiple "Shipments" against a SalesOrder
- Refactors process for stock allocation against a SalesOrder
v20 -> 2021-12-03
- Adds ability to filter POLineItem endpoint by "base_part"
Expand Down
2 changes: 1 addition & 1 deletion InvenTree/build/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def validate(self, data):
Validation
"""

super().validate(data)
data = super().validate(data)

items = data.get('items', [])

Expand Down
2 changes: 1 addition & 1 deletion InvenTree/company/templates/company/company_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,4 @@
});
}

{% endblock %}
{% endblock %}
12 changes: 11 additions & 1 deletion InvenTree/order/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from .models import PurchaseOrder, PurchaseOrderLineItem
from .models import SalesOrder, SalesOrderLineItem
from .models import SalesOrderAllocation
from .models import SalesOrderShipment, SalesOrderAllocation


class PurchaseOrderLineItemInlineAdmin(admin.StackedInline):
Expand Down Expand Up @@ -137,6 +137,15 @@ class SalesOrderLineItemAdmin(ImportExportModelAdmin):
)


class SalesOrderShipmentAdmin(ImportExportModelAdmin):

list_display = [
'order',
'shipment_date',
'reference',
]


class SalesOrderAllocationAdmin(ImportExportModelAdmin):

list_display = (
Expand All @@ -152,4 +161,5 @@ class SalesOrderAllocationAdmin(ImportExportModelAdmin):
admin.site.register(SalesOrder, SalesOrderAdmin)
admin.site.register(SalesOrderLineItem, SalesOrderLineItemAdmin)

admin.site.register(SalesOrderShipment, SalesOrderShipmentAdmin)
admin.site.register(SalesOrderAllocation, SalesOrderAllocationAdmin)
Loading

0 comments on commit 3f2cdf9

Please sign in to comment.