2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

Refactor BuildOrderCreate form

This commit is contained in:
Oliver
2021-07-09 00:18:03 +10:00
parent 5016d44b83
commit 004b36b1df
7 changed files with 56 additions and 144 deletions

View File

@ -43,8 +43,10 @@ def get_next_po_number():
attempts = set([order.reference])
reference = order.reference
while 1:
reference = increment(order.reference)
reference = increment(reference)
if reference in attempts:
# Escape infinite recursion
@ -70,8 +72,10 @@ def get_next_so_number():
attempts = set([order.reference])
reference = order.reference
while 1:
reference = increment(order.reference)
reference = increment(reference)
if reference in attempts:
# Escape infinite recursion