[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user