-
- Downloads
[FIX] purchase_stock: update RR's qty_to_order on POL's qty change
When a RR updates the qty of a POL, the qty to order of that RR will
be incorrect
To reproduce the issue:
1. Create a product
- Storable
- With a vendor
2. Create a RR:
- Min 0
- Max 0
- Factor 1
3. Confirm a delivery with 1 x P
- It should create a PO
4. Confirm a second delivery with 1 x P
- The POL of the PO should be updated
5. Open the Replenishment page
Error: The qty to order of the product is 1 while it should be 0
`qty_to_order` is a computed field and one of the `depends` is the POL
related to the product. This explains why, after step 3, everything
is ok: the compute is triggered (because of the new POL) and the qty
to order becomes 0. However, step 4, the POL qty is updated -> it
does not concern any `depends` -> the compute is not triggered,
hence the error
OPW-3292297
closes odoo/odoo#127554
Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
Loading
Please register or sign in to comment