Files
odoo_source/addons/repair
snd a4b21bf5c8 [FIX] stock: unreserve the correct quantity
case:
- create a UoM 'Hundreds' related to UoM 'Units', bigger by factor x100
- create a delivery picking
- create a move with the UoM Hundreds, indicate 10 Hundreds
- validate, 1000 should be reserved
- unreserve, only 10 units are unreserved, 990 are still reserved

This is because the stock move line takes the UoM of the stock move by default on the `quantity` field
and `unreserve` uses that field instead of `quantity_product_uom`

This bug led to the discovery of other cases where `quantity_product_uom` should be used instead of `quantity`

closes odoo/odoo#144574

Related: odoo/enterprise#51964
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-12-04 13:23:37 +00:00
..