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

Proposed by Rohan Nayani(Open ERP)
Status: Merged
Merged at revision: 4748
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-777803-ron
Merge into: lp:openobject-addons
Diff against target: 12 lines (+2/-0)
1 file modified
stock/wizard/stock_change_product_qty.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-777803-ron
Reviewer Review Type Date Requested Status
qdp (OpenERP) Needs Fixing
Rucha (Open ERP) (community) Approve
Review via email: mp+60147@code.launchpad.net

Description of the change

entering a negative value in the stock level when click on update button on product form

To post a comment you must log in.
Revision history for this message
Rucha (Open ERP) (rpa-openerp) :
review: Approve
Revision history for this message
qdp (OpenERP) (qdp) wrote :

0 is an acceptable value

review: Needs Fixing
Revision history for this message
qdp (OpenERP) (qdp) wrote :

i fixed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/wizard/stock_change_product_qty.py'
2--- stock/wizard/stock_change_product_qty.py 2011-03-03 13:27:14 +0000
3+++ stock/wizard/stock_change_product_qty.py 2011-05-06 06:54:27 +0000
4@@ -85,6 +85,8 @@
5
6 res_original = prod_obj_pool.browse(cr, uid, rec_id, context=context)
7 for data in self.browse(cr, uid, ids, context=context):
8+ if data.new_quantity <= 0:
9+ raise osv.except_osv(_('Warning!'), _('Quantity cannot be negative or zero.'))
10 inventory_id = inventry_obj.create(cr , uid, {'name': _('INV: %s') % tools.ustr(res_original.name)}, context=context)
11 line_data ={
12 'inventory_id' : inventory_id,

Subscribers

People subscribed via source and target branches

to all changes: