2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-09 20:21:24 +00:00

Write unit test for PurchaseOrder receive views

This commit is contained in:
Oliver Walters
2020-01-06 20:50:16 +11:00
parent 3def3e1e89
commit e103bd8880
2 changed files with 74 additions and 2 deletions

View File

@@ -381,6 +381,10 @@ class PurchaseOrderReceive(AjaxUpdateView):
line.receive_quantity = receive
self.lines.append(line)
if len(self.lines) == 0:
msg = _("No lines specified")
errors = True
# No errors? Receive the submitted parts!
if errors is False:
self.receive_parts()