[FIX] mrp: cost report
The unit price on the cost report should not be rounded using the product UoM. opw-760299
This commit is contained in:
@@ -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})
|
||||
return self.env['report'].render('mrp.mrp_bom_cost', {'lines': res})
|
||||
|
||||
Reference in New Issue
Block a user