[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
This commit is contained in:
Swapnesh Shah
2018-06-28 16:06:49 +02:00
committed by Simon Lejeune
parent c02fe10add
commit ef0907d5b0
+1 -1
View File
@@ -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.