summaryrefslogtreecommitdiff
path: root/addons/purchase_mrp/models
diff options
context:
space:
mode:
authorJosse Colpaert <jco@odoo.com>2016-09-21 16:14:07 +0200
committerJosse Colpaert <jco@odoo.com>2016-09-28 12:38:13 +0200
commit153a6d08148488cd1532b967ca387c793cb01313 (patch)
tree137c96563e1f09d1f6fb703c7985c6775e7b0d92 /addons/purchase_mrp/models
parentfbab021a9b3d482c438f2caf26dab1b1d8a95041 (diff)
[FIX] mrp: correct interpretation of explode's quantity parameter
In previous versions, the quantity passed to the bom_explode was the number of times you needed to count the BoM. If the BoM was for 2 dozens and you pass 48 units, 2 was passed to the bom_explode method. We are now doing the same for the explode method and we check it is called this way everywhere.
Diffstat (limited to 'addons/purchase_mrp/models')
-rw-r--r--addons/purchase_mrp/models/purchase_mrp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/purchase_mrp/models/purchase_mrp.py b/addons/purchase_mrp/models/purchase_mrp.py
index 99ff9aaa3eb..993e54d234f 100644
--- a/addons/purchase_mrp/models/purchase_mrp.py
+++ b/addons/purchase_mrp/models/purchase_mrp.py
@@ -27,7 +27,7 @@ class PurchaseOrderLine(models.Model):
bom_delivered = {}
if bom:
bom_delivered[bom.id] = False
- product_uom_qty_bom = self.env['product.uom']._compute_qty_obj(self.product_uom, self.product_qty, bom.product_uom_id)
+ product_uom_qty_bom = self.env['product.uom']._compute_qty_obj(self.product_uom, self.product_qty, bom.product_uom_id) / bom.product_qty
boms, lines = bom.explode(self.product_id, product_uom_qty_bom)
for bom_line, data in lines:
qty = 0.0