Allow cancelling done move
When a shipment or a production is cancelled, it may leave some moves done because they can not be cancelled. The solution proposed in #3988 (closed) and #6096 (closed) is not really practical for many reasons:
- it will require to create internal shipment in waiting state to be able to keep the origin location (but this will be lost if it is reset to draft)
- for supplier shipment, it requires to create return shipment but if we keep the link with the purchase than the quantity computation will be wrong (and if we fix the computation, there is still the case of return being cancelled and make the purchase in exception).
- if many shipments or productions are cancelled at once, it will create many internal shipments
So finally for me the best solution is to allow to cancel the moves done by adding the transition from done to cancelled. Of course this will be forbidden if the move is in a period closed or if it was used for FIFO computation. In this case (which should be very rare) the user will have to manage manually as currently. I think also that we should not display the cancel button on move done to the user because indeed such behavior is only useful for managed moves like in shipment or production.