diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f2258372907..19328fa16c0 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1426,7 +1426,7 @@ class stock_production_lot(osv.osv): ids = [ids] res = {}.fromkeys(ids, 0.0) - if locations: + if locations and ids: cr.execute('''select prodlot_id, sum(qty)