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:
1 parent
e7aeba935f
commit
9d6ec11baf
1 file changed
+1
-1
+1
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user