[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#126144 X-original-commit: cf68853573f70f8dfa84a15ef515479142705a38 Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
committed by
Tiffany Chang (tic)
parent
15e0661151
commit
7ef8e358b3
@@ -369,7 +369,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()
|
||||
|
||||
Reference in New Issue
Block a user