From e6ba7724066a4b6fafb8527dea3dcb86405fdc1b Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 1 Dec 2016 09:59:09 +0100 Subject: [PATCH] [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 --- addons/mrp/report/mrp_bom_cost_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/report/mrp_bom_cost_report.py b/addons/mrp/report/mrp_bom_cost_report.py index cbbdf935497..e921bf6c512 100644 --- a/addons/mrp/report/mrp_bom_cost_report.py +++ b/addons/mrp/report/mrp_bom_cost_report.py @@ -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