mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 11:35:41 +00:00
Re-implement item saving for non-tracked parts
This commit is contained in:
@ -608,9 +608,12 @@ class StockItemCreate(AjaxCreateView):
|
|||||||
form.errors['serial_numbers'] = e.messages
|
form.errors['serial_numbers'] = e.messages
|
||||||
valid = False
|
valid = False
|
||||||
|
|
||||||
print("Valid?", valid)
|
else:
|
||||||
|
# For non-serialized items, simply save the form.
|
||||||
valid = False
|
# 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)
|
print("valid:", valid)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user