# Create a partial shipment with staging moves

**URL:** <https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934>\
**Category:** User\
**Tags:** stock\
**Created:** [June 26, 2020, 7:37am UTC](https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934 "2020-06-26T07:37:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [June 26, 2020, 7:37am UTC](https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934/1 "2020-06-26T07:37:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [June 26, 2020, 7:51am UTC](https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934/2 "2020-06-26T07:51:38Z")

</div>

I think we expected that the staging move was deleted instead of set to 0. But with [Unify assignation wizard (#9422) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue9422), this will become the default behavior. So I think we should ignore 0 quantity moves in the synchronization of the shipment.

> [@pokoli](#):
>
> 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 guess we must set to done any move with 0 quantity.

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [June 26, 2020, 8:13am UTC](https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934/3 "2020-06-26T08:13:59Z")

</div>

> [@ced](#):
>
> I think we expected that the staging move was deleted instead of set to 0.

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

> [@ced](#):
>
> I guess we must set to done any move with 0 quantity.

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

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [June 26, 2020, 8:19am UTC](https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934/4 "2020-06-26T08:19:52Z")

</div>

> [@pokoli](#):
>
> but the customer moves it’s also keep for ever on staging state.

I do not understand.

> [@pokoli](#):
>
> There is no transition from staging to done moves and adding this transition will probably make the code more complex.

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

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [June 26, 2020, 8:43am UTC](https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934/5 "2020-06-26T08:43:25Z")

</div>

> [@ced](#):
>
> > [@pokoli](#):
> >
> > but the customer moves it’s also keep for ever on staging state.
> 
> I do not understand.

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.

> [@ced](#):
>
> Indeed so we need to find a way to force user to delete the staging moves.

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

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [June 26, 2020, 8:52am UTC](https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934/6 "2020-06-26T08:52:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [June 30, 2020, 1:55pm UTC](https://discuss.tryton.org/t/create-a-partial-shipment-with-staging-moves/2934/7 "2020-06-30T13:55:11Z")

</div>

I’ve created [Partial shipment with staging moves (#9448) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue9448) 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.
