2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-09 20:21:24 +00:00
This commit is contained in:
Oliver Walters
2019-09-13 20:52:25 +10:00
parent 59f102af3c
commit 36ec5e41b0
5 changed files with 40 additions and 4 deletions

View File

@@ -243,6 +243,11 @@ class PurchaseOrderReceive(AjaxView):
except (PurchaseOrderLineItem.DoesNotExist, ValueError):
continue
# Check that line matches the order
if not line.order == self.order:
# TODO - Display a non-field error?
continue
# Ignore a part that doesn't map to a SupplierPart
try:
if line.part is None:
@@ -277,6 +282,7 @@ class PurchaseOrderReceive(AjaxView):
return self.renderJsonResponse(request, data=data)
@transaction.atomic
def receive_parts(self):
""" Called once the form has been validated.
Create new stockitems against received parts.