[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
This commit is contained in:
E.R. Spada II 2015-03-24 23:10:05 -04:00 committed by Martin Trigaux
parent 00c2a9980e
commit 707db0399e
1 changed files with 1 additions and 1 deletions

View File

@ -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