[MERGE]Merged with Trunk-dev-addons2
authorron@tinyerp.com <>
Wed, 22 Dec 2010 05:48:27 +0000 (11:18 +0530)
committerron@tinyerp.com <>
Wed, 22 Dec 2010 05:48:27 +0000 (11:18 +0530)
bzr revid: ron@tinyerp.com-20101222054827-4j3swsc75ryk54zt

1  2 
addons/mrp/mrp_view.xml
addons/product/product.py
addons/purchase/purchase_view.xml
addons/stock/stock.py

Simple merge
Simple merge
Simple merge
@@@ -2265,7 -2282,11 +2282,9 @@@ 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
              uos_qty_rest = quantity_rest / move_qty * move.product_uos_qty
              if quantity_rest <= 0: