From 4f5b0463aef7fa6e85ed004c522eed8b72551685 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 1 Aug 2017 18:18:51 +0200 Subject: [PATCH] [FIX] mrp: cost report The unit price on the cost report should not be rounded using the product UoM. opw-760299 --- addons/mrp/report/bom_cost.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/report/bom_cost.py b/addons/mrp/report/bom_cost.py index d27a05b1bce..216dcc80459 100644 --- a/addons/mrp/report/bom_cost.py +++ b/addons/mrp/report/bom_cost.py @@ -27,7 +27,7 @@ class MrpBomCost(models.AbstractModel): total = 0.0 for bom_line in result: line_product = self.env['product.product'].browse(bom_line['product_id']) - price_uom = self.env['product.uom']._compute_qty(line_product.uom_id.id, line_product.standard_price, bom_line['product_uom']) + price_uom = self.env['product.uom']._compute_price(line_product.uom_id.id, line_product.standard_price, bom_line['product_uom']) line = { 'product_id': line_product, 'product_uom_qty': bom_line['product_qty'], @@ -45,4 +45,4 @@ class MrpBomCost(models.AbstractModel): def render_html(self, data=None): boms = self.env['mrp.bom'].browse(self.ids) res = self.get_lines(boms) - return self.env['report'].render('mrp.mrp_bom_cost', {'lines': res}) \ No newline at end of file + return self.env['report'].render('mrp.mrp_bom_cost', {'lines': res})