[IMP] Negative quants reserve raise error

bzr revid: jco@openerp.com-20140128165847-uw13d6bvdljzgswg
This commit is contained in:
Josse Colpaert
2014-01-28 17:58:47 +01:00
parent 68f0f8db8f
commit 5811842724
+2
View File
@@ -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)