mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Improve create of purchase order line to set it compatible with test_data
This commit is contained in:
committed by
Thomas Binsfeld
parent
8b4a5bb3ef
commit
4590da7c01
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user