diff --git a/modules/stock/shipment.py b/modules/stock/shipment.py index b542576386..a929dec67e 100644 --- a/modules/stock/shipment.py +++ b/modules/stock/shipment.py @@ -2494,6 +2494,8 @@ class ShipmentInternal(ShipmentAssignMixin, Workflow, ModelSQL, ModelView): if m.state != 'done' and m.from_location != shipment.transit_location and m.to_location != shipment.transit_location] + if not moves: + continue Move.copy(moves, default={ 'to_location': shipment.transit_location.id, 'planned_date': shipment.planned_start_date,