Allow creation of a stock item with zero quantity

This commit is contained in:
Oliver Walters 2020-07-30 21:05:37 +10:00
parent 8a1f358505
commit 10691b3d03

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: