← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-777803-ron into lp:openobject-addons

 

Rohan Nayani(Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-777803-ron into lp:openobject-addons.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)
Related bugs:
  Bug #777803 in OpenERP Addons: "[PS] Wrong result when updating the stock level to a negative value"
  https://bugs.launchpad.net/openobject-addons/+bug/777803

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-777803-ron/+merge/60147

entering a negative value in the stock level when click on update button on product form
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-777803-ron/+merge/60147
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-777803-ron.
=== modified file 'stock/wizard/stock_change_product_qty.py'
--- stock/wizard/stock_change_product_qty.py	2011-03-03 13:27:14 +0000
+++ stock/wizard/stock_change_product_qty.py	2011-05-06 06:08:28 +0000
@@ -85,6 +85,8 @@
 
         res_original = prod_obj_pool.browse(cr, uid, rec_id, context=context)
         for data in self.browse(cr, uid, ids, context=context):
+            if data.new_quantity <= 0:
+                raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !'))
             inventory_id = inventry_obj.create(cr , uid, {'name': _('INV: %s') % tools.ustr(res_original.name)}, context=context)
             line_data ={
                 'inventory_id' : inventory_id,


Follow ups