summaryrefslogtreecommitdiff
path: root/odoo/sql_db.py
diff options
context:
space:
mode:
authorPierre Masereel <pim@odoo.com>2017-07-26 12:18:33 +0200
committerSimon Lejeune <sle@openerp.com>2017-07-26 17:23:55 +0200
commit8a497cdd5ff4cf93067d0519a9839ea6ec9adc21 (patch)
treeeef4e9c4bfd4caf8381d38d122e08502cfc8ff76 /odoo/sql_db.py
parent2a0b158d4490817388da7de94969447d02744386 (diff)
[FIX] stock: quant: _update_reserved_quantity and negative quantity
If we have multiple quants returned when we want to decrease the reservation of a move line, the min function will always return the quantity passed in argument because 'reserved_quantity' is always a positive number and quantity a negative one. This can lead to negative reserved quantity on a quant, if the quantity to reserve on the first quant is lower than the absolute value of the quantity to decrease. To fix this, we correctly separate the behaviors for decrease and increase. We add a test that show the, now fixed, bug.
Diffstat (limited to 'odoo/sql_db.py')
0 files changed, 0 insertions, 0 deletions