Issue 10430

Drop shipments without sale origin are created
Nosy list
acaubet, pokoli, reviewbot, roundup-bot
Assigned to

Created on 2021-05-17.15:34:25 by acaubet, last changed 2 months ago by acaubet.


Author: [hidden] (acaubet)
Date: 2022-08-04.11:34:09

I'll open a new issue

Author: [hidden] (acaubet)
Date: 2022-08-04.11:30:28

This issue has happened many times after the patch without knowing how it happens.
Finally I found the problem, the user is changing(reducing) the quantity or splitting moves of the customer moves instead of supplier moves.
This result in the same as the original message.
You can test with:

--- a/tests/scenario_sale_supply_drop_shipment.rst      Mon May 02 17:45:46 2022 +0200
+++ b/tests/scenario_sale_supply_drop_shipment.rst      Thu Aug 04 11:22:35 2022 +0200
@@ -193,13 +193,13 @@

     >>> set_user(stock_user)
     >>> move, = shipment.supplier_moves
-    >>> move.quantity = 100
     >>> move.unit_price
     >>> move.cost_price
     >>> move, = shipment.customer_moves
+    >>> move.quantity = 100
     >>> move.unit_price
     >>> move.cost_price

Which should be the solution? Sync moves? Blocking user change of customer moves?

New changeset e779cfdf0951 by Adrià Tarroja Caubet in branch '6.0':
Process sales on ship

New changeset 16401f4edbfc by Adrià Tarroja Caubet in branch '5.8':
Process sales on ship

New changeset 5f2b47f74265 by Adrià Tarroja Caubet in branch '5.0':
Process sales on ship
New changeset 98878e49a781 by Cédric Krier in branch 'default':
Process sales on ship
New changeset 20b2886e3f89 by Adrià Tarroja Caubet in branch 'default':
Process sales on ship
Author: [hidden] (acaubet)
Date: 2021-05-17.15:34:25

Sending less units on drop shipment create a new drop shipment with remaining units but without the origin on the customer moves.

How to reproduce:
a. Create a Drop shipment (send x units)
b. On shipment, reduce the quantity to send (x-1)
c. > Ship
A new drop shipment with supplier and costumer moves but it's only related to the purchase and not to the sale because customer moves don't have origin.

As purchase.create_move() calls to DropShipment.wait() so _synchronize_moves create new_customer_move for each supplier moves without the sale movements being created.

Date User Action Args
2022-08-04 11:34:09acaubetsetmessages: + msg77559
status: chatting -> closed
2022-08-04 11:30:28acaubetsetmessages: + msg77558
status: resolved -> chatting
2021-10-29 01:57:19roundup-botsetkeyword: - backport
messages: + msg71374
2021-10-22 10:16:29roundup-botsetmessages: + msg71216
2021-10-22 10:16:18roundup-botsetmessages: + msg71214
nosy: + roundup-bot
status: testing -> resolved
2021-10-22 10:15:09cedsetkeyword: + backport
2021-10-20 11:06:44reviewbotsetmessages: + msg71119
2021-05-19 12:30:57reviewbotsetmessages: + msg67687
2021-05-19 12:00:37reviewbotsetmessages: + msg67684
2021-05-19 09:55:01reviewbotsetmessages: + msg67676

Showing 10 items. Show all history (warning: this could be VERY long)