[FIX]: Fixed problem of zero division in action_consume of move
bzr revid: rpa@tinyerp.com-20101221071653-ksfh0unorhuuk3e7
This commit is contained in:
parent
977020567b
commit
394cfd398f
|
@ -2272,6 +2272,8 @@ class stock_move(osv.osv):
|
|||
res = []
|
||||
for move in self.browse(cr, uid, ids, context=context):
|
||||
move_qty = move.product_qty
|
||||
if move_qty <= 0:
|
||||
raise osv.except_osv(_('Error!'), _('Can not consume a move with negative or zero quantity !'))
|
||||
quantity_rest = move.product_qty
|
||||
|
||||
quantity_rest -= quantity
|
||||
|
|
Loading…
Reference in New Issue