Merge pull request #889 from SchrodingersGat/allow-empty-stock

Allow creation of a stock item with zero quantity
This commit is contained in:
Oliver authored and GitHub committed 2020-07-30 21:09:57 +10:00
commit e0e82dabf3
1 file changed
+2 -2
+2 -2
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: