Created on 2021-05-17.15:34:25 by acaubet, last changed 2 months ago by acaubet.
I'll open a new issue
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 Decimal('3.0000') >>> move.cost_price Decimal('3.0000') >>> shipment.click('ship') >>> move, = shipment.customer_moves + >>> move.quantity = 100 >>> move.unit_price Decimal('10.0000') >>> 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 https://hg.tryton.org/modules/sale_supply_drop_shipment/rev/e779cfdf0951 New changeset 16401f4edbfc by Adrià Tarroja Caubet in branch '5.8': Process sales on ship https://hg.tryton.org/modules/sale_supply_drop_shipment/rev/16401f4edbfc New changeset 5f2b47f74265 by Adrià Tarroja Caubet in branch '5.0': Process sales on ship https://hg.tryton.org/modules/sale_supply_drop_shipment/rev/5f2b47f74265
New changeset 98878e49a781 by Cédric Krier in branch 'default': Process sales on ship https://hg.tryton.org/tryton-env/rev/98878e49a781
New changeset 20b2886e3f89 by Adrià Tarroja Caubet in branch 'default': Process sales on ship https://hg.tryton.org/modules/sale_supply_drop_shipment/rev/20b2886e3f89
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.
purchase.create_move() calls to
new_customer_move for each supplier moves without the sale movements being created.
status: chatting -> closed
status: resolved -> chatting
messages: + msg71374
|2021-10-22 10:16:29||roundup-bot||set||messages: + msg71216|
nosy: + roundup-bot
status: testing -> resolved
|2021-10-22 10:15:09||ced||set||keyword: + backport|
|2021-10-20 11:06:44||reviewbot||set||messages: + msg71119|
|2021-05-19 12:30:57||reviewbot||set||messages: + msg67687|
|2021-05-19 12:00:37||reviewbot||set||messages: + msg67684|
|2021-05-19 09:55:01||reviewbot||set||messages: + msg67676|
Showing 10 items. Show all history (warning: this could be VERY long)