Empty planned date for purchase backorders
#8284 (closed) added the feature to reuse delivery date for backorder moves but this is not working correctly (at least for purchases). Here is some scenario to reproduce the issue:
- Create a new purchase, add a new line and manually set a delivery date for the next week.
- Create a new shipment (use the same supplier for the purchase) and receive a partial quantity without setting any date (the shipment is received today).
Current behaviour:
- A new move is created without any date
Expected behaviour:
- The new move keeps the planned that for the next week (as set on the purchase line)
The problem comes from the fact that delivery_date reads the effective_date or planned date from the move which in case of backorder mean overriding the default definition with the first delivery date.
I think it will be less atonishing for the user to keep the delivery_date in case there are not draft moves.