diff --git a/stock_picking_type_routing_operation/models/stock_move.py b/stock_picking_type_routing_operation/models/stock_move.py index 11d1b79edcd8..fc0b76c4b8d1 100644 --- a/stock_picking_type_routing_operation/models/stock_move.py +++ b/stock_picking_type_routing_operation/models/stock_move.py @@ -289,10 +289,11 @@ def _apply_move_location_dest_routing_operation(self): picking_type = destination._find_picking_type_for_routing("dest") if not picking_type: continue + if self.env["stock.location"].search( [ - ("id", "=", picking_type.default_location_dest_id.id), - ("id", "parent_of", move.location_dest_id.id), + ("id", "=", picking_type.default_location_src_id.id), + ("id", "parent_of", move.location_id.id), ] ): # This move has been created for the routing operation,