From c776dce53157e53cb9e4e1b4c302474b7781e5c9 Mon Sep 17 00:00:00 2001 From: Wolfgang Taferner Date: Thu, 2 Jul 2015 13:55:50 +0200 Subject: [PATCH] Revert "[FIX] product_extended: cost price computation from BOM" This reverts commit 2f5d681135566bef7fd27dab683642486b249ef1. The previous commit was intended to fix a wrong assumption in case the purchase uom was different to the standard uom. The wrong assumption: - price is related to purchase uom - therefore it was tried to convert the bom price accordingly - as the price needs to be already in standard uom it does lead to a wrong calculation now Closes #7421 --- addons/product_extended/product_extended.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/product_extended/product_extended.py b/addons/product_extended/product_extended.py index fd7c3084b25..a8bcea6e144 100644 --- a/addons/product_extended/product_extended.py +++ b/addons/product_extended/product_extended.py @@ -76,9 +76,8 @@ class product_template(osv.osv): for sbom in bom.bom_line_ids: my_qty = sbom.product_qty if not sbom.attribute_value_ids: - bom_product = sbom.product_id # No attribute_value_ids means the bom line is not variant specific - price += uom_obj._compute_price(cr, uid, bom_product.uom_po_id and bom_product.uom_po_id.id or bom_product.uom_id.id, bom_product.standard_price, sbom.product_uom.id) * my_qty + price += uom_obj._compute_price(cr, uid, sbom.product_id.uom_id.id, sbom.product_id.standard_price, sbom.product_uom.id) * my_qty if bom.routing_id: for wline in bom.routing_id.workcenter_lines: