Skip to content
Snippets Groups Projects
Commit ea923a08 authored by Arnold Moyaux's avatar Arnold Moyaux
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#120680

Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
parent 4227b76e
No related branches found
No related tags found
No related merge requests found
......@@ -344,7 +344,7 @@ class StockWarehouseOrderpoint(models.Model):
warehouse=warehouse.id,
to_date=fields.datetime.now() + 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:
key_to_remove.append((qty['id'], warehouse.id))
else:
......
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