Do not try to duplicate moves for transit if internal shipment has no move

Closes #12541
(grafted from 812f190f0f95914a8a68332584e54405a7e68347)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2023-09-04 16:47:49 +02:00
parent e09c7bf5c8
commit fd72e52de6
+2
View File
@@ -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,