[FIX] mrp: BOM Cost report

1. Set up BoM component A with cost of $1 per kg
2. Create a BoM which uses 1t of component A
3. Execute the BOM Cost report

Cost of component A is $1, while it should be $1000.

opw-695014
This commit is contained in:
Nicolas Martinelli
2016-12-01 09:59:09 +01:00
parent 60300fc287
commit e6ba772406
+1 -1
View File
@@ -26,7 +26,7 @@ class MrpBomCost(models.AbstractModel):
'attributes': attributes}
total = 0.0
for bom_line, line_data in result2:
price_uom = bom_line.product_uom_id._compute_quantity(bom_line.product_id.standard_price, bom_line.product_uom_id)
price_uom = bom_line.product_id.uom_id._compute_price(bom_line.product_id.standard_price, bom_line.product_uom_id)
line = {
'product_id': bom_line.product_id,
'product_uom_qty': line_data['qty'], #line_data needed for phantom bom explosion