Re-implement item saving for non-tracked parts

This commit is contained in:
Oliver Walters 2019-07-23 11:31:29 +10:00
parent 9e5eadd6c3
commit d82d8f5cd1

View File

@ -608,9 +608,12 @@ class StockItemCreate(AjaxCreateView):
form.errors['serial_numbers'] = e.messages
valid = False
print("Valid?", valid)
valid = False
else:
# For non-serialized items, simply save the form.
# We need to call _post_clean() here because it is prevented in the form implementation
form.clean()
form._post_clean()
form.save()
print("valid:", valid)