mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
Merge pull request #889 from SchrodingersGat/allow-empty-stock
Allow creation of a stock item with zero quantity
This commit is contained in:
commit
e0e82dabf3
@ -1239,8 +1239,8 @@ class StockItemCreate(AjaxCreateView):
|
|||||||
valid = False
|
valid = False
|
||||||
form.errors['quantity'] = [_('Invalid quantity')]
|
form.errors['quantity'] = [_('Invalid quantity')]
|
||||||
|
|
||||||
if quantity <= 0:
|
if quantity < 0:
|
||||||
form.errors['quantity'] = [_('Quantity must be greater than zero')]
|
form.errors['quantity'] = [_('Quantity cannot be less than zero')]
|
||||||
valid = False
|
valid = False
|
||||||
|
|
||||||
if part is None:
|
if part is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user