diff --git a/stock_move_location/tests/test_move_location.py b/stock_move_location/tests/test_move_location.py index 9042be42f..8d4c22c24 100644 --- a/stock_move_location/tests/test_move_location.py +++ b/stock_move_location/tests/test_move_location.py @@ -156,6 +156,14 @@ class TestMoveLocation(TestsCommon): putaway_line.destination_location_id, self.internal_loc_2_shelf ) + # Actually commit the wizard and check stock.move.line.location_dest_id + ret = wizard.action_move_location() + picking = self.env["stock.picking"].browse([ret["res_id"]]) + putaway_move_line = picking.move_line_ids.filtered( + lambda l: l.product_id == self.product_no_lots + )[0] + self.assertEqual(putaway_move_line.location_dest_id, self.internal_loc_2_shelf) + def test_delivery_order_assignation_after_transfer(self): """ Make sure using the wizard doesn't break assignation on delivery orders diff --git a/stock_move_location/wizard/stock_move_location_line.py b/stock_move_location/wizard/stock_move_location_line.py index 022f15ab0..2dcaf371d 100644 --- a/stock_move_location/wizard/stock_move_location_line.py +++ b/stock_move_location/wizard/stock_move_location_line.py @@ -103,7 +103,7 @@ class StockMoveLocationWizardLine(models.TransientModel): self.ensure_one() location_dest_id = ( self.move_location_wizard_id.apply_putaway_strategy - and self.destination_location_id.get_putaway_strategy(self.product_id).id + and self.destination_location_id._get_putaway_strategy(self.product_id).id or self.destination_location_id.id ) qty_todo, qty_done = self._get_available_quantity()