Revert "[FIX] product_extended: cost price computation from BOM"

This reverts commit 2f5d681135.

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
This commit is contained in:
Wolfgang Taferner 2015-07-02 13:55:50 +02:00 committed by Denis Ledoux
parent 72ec0050b4
commit c776dce531
1 changed files with 1 additions and 2 deletions

View File

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