Create a partial shipment with staging moves

Hi,

I’ve created a sale with two products, one that I have in stock and the other that is supplied on sale.
This means that the customer shipment has two moves, one in draft state and another in staging state.

The customer asked to deliver the available goods and send the missing ones in another shipment. To do so I’ve gone to the customer shipment, assigned it and set to zero the quantities of staging move.

If i try to assing the shipment the system complains about moves not possible to assign (due to the staging one) but it does not show the move on the list of pending moves. Is this the expected behaviour? Or should I do something else to skip staging moves?

Furthermore, If I force the assignation I can finish the shipment but the move keeps in the staging state (event when the shipment is finished), with seems strange.

I think we expected that the staging move was deleted instead of set to 0. But with Issue 9422: Unify assignation wizard - Tryton issue tracker, this will become the default behavior. So I think we should ignore 0 quantity moves in the synchronization of the shipment.

I guess we must set to done any move with 0 quantity.

Deleting the move allow to continue with the shipment but the customer moves it’s also keep for ever on staging state.

There is no transition from staging to done moves and adding this transition will probably make the code more complex.

I do not understand.

Indeed so we need to find a way to force user to delete the staging moves.

I mean that deleting the inventory moves, sets the outgoing move quantity to zero but it’s state is keep as staging. So when the shipment is finished the outgoing move is not done but staging.

This will not solve the issue for outgoing moves. So I’m wondering if it won’t be better to set to draft staging moves with zero quantities so they will continue with the normal workflow

I think it is not correct to change the state of staging move (except for the document creating them).
So for me, the proper solution is to delete them automatically when shipment goes forward in the workflow.

I’ve created Issue 9448: Partial shipment with staging moves - Tryton issue tracker which removes the moves but also includes the staging moves on the assign warning.

It also makes assignation not required for moves without quantity so it is possible to assign the shipment when the quantity is set to zero.