Files
odoo_source/addons/stock/tests
Adrien Widart (awt) 55f461060e [FIX] stock: display backorder wizard
To reproduce the issue:
1. Create a planned receipt with two lines:
   - 10 x P
   - 10 x P
2. Confirm and set the done quantities:
   - 12 x P
   - 8 x P
3. Validate

Error: The receipt is directly processed and a backorder is created.
In case a backorder could be created, we should first display the
wizard that asks for a user's confirmation

When checking for the backorder wizard, we compare, for each
**product**, the sum of the demands with the sum of the done
quantities. In the above use case, we will have `10 + 10 == 12 + 8`,
so we don't display the wizard.

However, while processing the SMs, this is different. For the second
SM, we will set its demand to 8, create a third SM with a demand
equal to 2 and create a new picking (the backorder) for this new SM.
This behaviour is legit, the backorder creation makes sense. This is
why this commit fixes the wizard display conditions.

OPW-3373255

closes odoo/odoo#138863

X-original-commit: 5affa219d8add6f256030b699f61ddf77a928c82
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-10-17 06:25:12 +00:00
..
…