Test for create_request should allow zero quantity

Since changeset c12f565887e7, it is allowed to have a quantity of zero for the
purchase request. So the test for manual creation should not catch this case.

issue5328
review21701002
This commit is contained in:
Cédric Krier committed 2016-02-22 23:16:12 +01:00
1 parent e7aeba935f
commit 9d6ec11baf
1 file changed
+1 -1
+1 -1
View File
@@ -539,7 +539,7 @@ class PurchaseRequest(ModelSQL, ModelView):
def create(cls, vlist):
for vals in vlist:
for field_name in ('product', 'quantity', 'uom', 'company'):
if not vals.get(field_name):
if vals.get(field_name) is None:
cls.raise_user_error('create_request')
return super(PurchaseRequest, cls).create(vlist)