Changing drop shipment quantity on customer_moves results to an empty origin
Related to #10430 (closed). If the user change quantity of customer moves sending less units on drop shipment results in a new drop shipment (if remain quantity) with remaining units but without the origin on the customer moves. If the user split customer moves on drop shipment results in a new splited move with no origin. Only modifications on supplier moves are supported by now if you don't want to lose origins.
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
How to reproduce: a. Create a Drop shipment (send x units) b. On shipment, reduce the quantity to send on customer moves (x-1) c. > Ship Result: 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.
Which should be the solution? Sync moves? Blocking user change of customer moves?