Improve create of purchase order line to set it compatible with test_data

This commit is contained in:
Laetitia Gangloff
2016-03-17 12:23:09 +01:00
committed by Thomas Binsfeld
parent 8b4a5bb3ef
commit 4590da7c01

View File

@@ -185,7 +185,7 @@ class PurchaseOrderLine(models.Model):
@api.model
def create(self, vals):
if 'product_qty' not in vals:
if 'product_qty' not in vals and 'product_purchase_qty' in vals:
# compute product_qty to avoid inverse computation and reset to 1
uom_obj = self.env['product.uom']
product_purchase_uom = uom_obj.browse(