Add action buttons to each build output

This commit is contained in:
Oliver Walters
2020-10-23 00:51:01 +11:00
parent 6245d65ebc
commit 33c454ed5a
4 changed files with 103 additions and 12 deletions

View File

@ -680,15 +680,12 @@ class BuildItemCreate(AjaxCreateView):
quantity = min(quantity, item.unallocated_quantity())
# If the output has been specified
print("output_id:", output_id)
if output_id:
try:
output = StockItem.objects.get(pk=output_id)
initials['install_into'] = output
print("Output:", output)
except (ValueError, StockItem.DoesNotExist):
pass
print("no output found")
if quantity is not None:
initials['quantity'] = quantity