diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 4510815a090..e306538d60a 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -292,6 +292,8 @@ class stock_quant(osv.osv): toreserve = [] #split quants if needed for quant, qty in quants: + if qty < 0.0: + raise osv.except_osv(_('Error!'), _('You can not reserve negative quants. ')) if not quant: continue self._quant_split(cr, uid, quant, qty, context=context)