Skip to content
Snippets Groups Projects
Commit cf688535 authored by Arnold Moyaux's avatar Arnold Moyaux Committed by Tiffany Chang (tic)
Browse files

[FIX] stock: wrong variable reference


product variable used in the rounding precision come from the upper
loop and won't work for all the quantites.

opw-3229080

closes odoo/odoo#121262

X-original-commit: ea923a08
Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
parent 750e2a2e
No related branches found
No related tags found
No related merge requests found
......@@ -361,7 +361,7 @@ class StockWarehouseOrderpoint(models.Model):
location=loc.id,
to_date=today + relativedelta.relativedelta(days=days)
).read(['virtual_available'])
for qty in qties:
for (product, qty) in zip(products, qties):
if float_compare(qty['virtual_available'], 0, precision_rounding=product.uom_id.rounding) < 0:
to_refill[(qty['id'], loc.id)] = qty['virtual_available']
products.invalidate_recordset()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment