From 10691b3d032a821c6a07066687aa83e9df334421 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 30 Jul 2020 21:05:37 +1000 Subject: [PATCH] Allow creation of a stock item with zero quantity --- InvenTree/stock/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/stock/views.py b/InvenTree/stock/views.py index 49db90d578..672f0a3892 100644 --- a/InvenTree/stock/views.py +++ b/InvenTree/stock/views.py @@ -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: