Some internal shipments can last for more than a day. It is the case for shipments between warehouses. So we need a way to make internal shipment in to steps.
The duration of a shipment between two warehouses is not necessary the same as the reverse way. They could not use the same shipping service etc.
The duration of an internal shipment could be computed using a
MatchMixin with criteria the warehouse of origin and the warehouse of destination.
The internal shipment must be altered in case there is a duration.
In this case the workflow must use an other path with one extra step shipped between assigned and done.
The moves should also be split on the waiting state into two sets where the From and the To is replaced by a Transit location respectively. (The unique list should be restored if it goes back to Draft.)
Of course the planned dates of each moves will be set according to the duration. Two new dates will be added to the shipment Planned Start Date and Effective Start Date (like for issue5560) and they will be automatically computed using the duration.
I think this is a design that has the advantage of keeping the internal shipment inside a warehouse simple. But it allows complex multi-warehouse setup.
The drawback is that in draft state, the forecast of the origin location will not be completly accurate but normally draft shipment should not stay long in draft.