mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Re-implement item saving for non-tracked parts
This commit is contained in:
parent
9e5eadd6c3
commit
d82d8f5cd1
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user