From ef0907d5b0858efbf7702c78698d21fadf0149e7 Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Fri, 22 Jun 2018 22:53:19 +0530 Subject: [PATCH] [fIX] stock: stock.move.line: write When updating the reservation of an partially available or available move line, use the current record of the loop and not the whole recordset. Closes #25445 --- addons/stock/models/stock_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_move_line.py b/addons/stock/models/stock_move_line.py index a63e37929f3..81fda382d91 100644 --- a/addons/stock/models/stock_move_line.py +++ b/addons/stock/models/stock_move_line.py @@ -268,7 +268,7 @@ class StockMoveLine(models.Model): except UserError: pass if new_product_qty != ml.product_qty: - new_product_uom_qty = self.product_id.uom_id._compute_quantity(new_product_qty, self.product_uom_id, rounding_method='HALF-UP') + new_product_uom_qty = ml.product_id.uom_id._compute_quantity(new_product_qty, ml.product_uom_id, rounding_method='HALF-UP') ml.with_context(bypass_reservation_update=True).product_uom_qty = new_product_uom_qty # When editing a done move line, the reserved availability of a potential chained move is impacted. Take care of running again `_action_assign` on the concerned moves.