Skip to content
Snippets Groups Projects
Commit e916526a authored by Arnold Moyaux's avatar Arnold Moyaux
Browse files

[FIX] sale_mrp: quantity invoiced in cogs is different than qty delivered


When a kit is exploded to `stock.move` the quantity is rounded half-up
for every move. But during the invoice. The quantity to invoice on
kit is rounded up so it could result in differences between the
inventory valuation and the cost of the product

closes odoo/odoo#81355

Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
parent 85f227b1
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ class SaleOrderLine(models.Model):
order_line.qty_delivered = 0.0
def _get_bom_component_qty(self, bom):
bom_quantity = self.product_id.uom_id._compute_quantity(1, bom.product_uom_id)
bom_quantity = self.product_id.uom_id._compute_quantity(1, bom.product_uom_id, rounding_method='HALF-UP')
boms, lines = bom.explode(self.product_id, bom_quantity)
components = {}
for line, line_data in lines:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment