diff --git a/addons/stock/models/stock_move_line.py b/addons/stock/models/stock_move_line.py index 9420eb3ae08..7ce871dbd10 100644 --- a/addons/stock/models/stock_move_line.py +++ b/addons/stock/models/stock_move_line.py @@ -251,9 +251,11 @@ class StockMoveLine(models.Model): else: for sml in smls: qty = max(sml.reserved_uom_qty, sml.qty_done) - sml.location_dest_id = sml.move_id.location_dest_id.with_context(exclude_sml_ids=excluded_smls.ids)._get_putaway_strategy( + putaway_loc_id = sml.move_id.location_dest_id.with_context(exclude_sml_ids=excluded_smls.ids)._get_putaway_strategy( sml.product_id, quantity=qty, packaging=sml.move_id.product_packaging_id, ) + if putaway_loc_id != sml.location_dest_id: + sml.location_dest_id = putaway_loc_id excluded_smls -= sml def _get_default_dest_location(self):