2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-12 18:15:40 +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:
Oliver
2020-07-30 21:09:57 +10:00
committed by GitHub

View File

@ -1239,8 +1239,8 @@ class StockItemCreate(AjaxCreateView):
valid = False
form.errors['quantity'] = [_('Invalid quantity')]
if quantity <= 0:
form.errors['quantity'] = [_('Quantity must be greater than zero')]
if quantity < 0:
form.errors['quantity'] = [_('Quantity cannot be less than zero')]
valid = False
if part is None: