diff --git a/addons/sale_mrp/models/sale.py b/addons/sale_mrp/models/sale.py index 3cdef0fc105..a59666dcc9e 100644 --- a/addons/sale_mrp/models/sale.py +++ b/addons/sale_mrp/models/sale.py @@ -98,7 +98,8 @@ class SaleOrderLine(models.Model): 'outgoing_moves': lambda m: m.location_dest_id.usage != 'customer' and m.to_refund } order_qty = order_line.product_uom._compute_quantity(order_line.product_uom_qty, relevant_bom.product_uom_id) - order_line.qty_delivered = moves._compute_kit_quantities(order_line.product_id, order_qty, relevant_bom, filters) + qty_delivered = moves._compute_kit_quantities(order_line.product_id, order_qty, relevant_bom, filters) + order_line.qty_delivered = relevant_bom.product_uom_id._compute_quantity(qty_delivered, order_line.product_uom) # If no relevant BOM is found, fall back on the all-or-nothing policy. This happens # when the product sold is made only of kits. In this case, the BOM of the stock moves