From 707db0399e0845bd67b19845ef6f01880af7ce9d Mon Sep 17 00:00:00 2001 From: "E.R. Spada II" Date: Tue, 24 Mar 2015 23:10:05 -0400 Subject: [PATCH] [FIX] product_extended: BOM Correct total cost When calculating the cost, quantity did not take the product efficiency into account when calculating the cost. The quantities on the MO order were correct, but not the cost that needs to be increased to compensent efficiency. Closes #5927 Closes #7648 --- addons/product_extended/product_extended.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_extended/product_extended.py b/addons/product_extended/product_extended.py index a8bcea6e144..8261ab9efdd 100644 --- a/addons/product_extended/product_extended.py +++ b/addons/product_extended/product_extended.py @@ -74,7 +74,7 @@ class product_template(osv.osv): uom_obj = self.pool.get("product.uom") tmpl_obj = self.pool.get('product.template') for sbom in bom.bom_line_ids: - my_qty = sbom.product_qty + my_qty = sbom.product_qty / sbom.product_efficiency if not sbom.attribute_value_ids: # No attribute_value_ids means the bom line is not variant specific price += uom_obj._compute_price(cr, uid, sbom.product_id.uom_id.id, sbom.product_id.standard_price, sbom.product_uom.id) * my_qty