diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d26ca8f0da3..657e6c9b5a2 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2670,7 +2670,7 @@ class stock_inventory(osv.osv): move_ids = [] for line in inv.inventory_line_id: pid = line.product_id.id - product_context.update(uom=line.product_uom.id, date=inv.date, prodlot_id=line.prod_lot_id.id) + product_context.update(uom=line.product_uom.id, to_date=inv.date, date=inv.date, prodlot_id=line.prod_lot_id.id) amount = location_obj._product_get(cr, uid, line.location_id.id, [pid], product_context)[pid] change = line.product_qty - amount