Merge lp:~numerigraphe/openobject-addons/trunk-stock-reset-negative-qty-onchange into lp:openobject-addons

Proposed by Numérigraphe
Status: Merged
Merged at revision: 7623
Proposed branch: lp:~numerigraphe/openobject-addons/trunk-stock-reset-negative-qty-onchange
Merge into: lp:openobject-addons
Diff against target: 19 lines (+2/-0)
1 file modified
stock/stock.py (+2/-0)
To merge this branch: bzr merge lp:~numerigraphe/openobject-addons/trunk-stock-reset-negative-qty-onchange
Reviewer Review Type Date Requested Status
OpenERP WMS Expert Pending
OpenERP Core Team Pending
Review via email: mp+94979@code.launchpad.net

Description of the change

The onchange methods on stock.move set the UoS qty to 0.0 when a negative qty is keyed in.
I propose to also set the UoM qty to 0.0, effectivly forbidding users to enter negative values.
Lionel Sausin.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2012-02-15 18:00:28 +0000
3+++ stock/stock.py 2012-02-28 15:15:23 +0000
4@@ -1764,6 +1764,7 @@
5 }
6
7 if (not product_id) or (product_qty <=0.0):
8+ result['product_qty'] = 0.0
9 return {'value': result}
10
11 product_obj = self.pool.get('product.product')
12@@ -1790,6 +1791,7 @@
13 }
14
15 if (not product_id) or (product_uos_qty <=0.0):
16+ result['product_uos_qty'] = 0.0
17 return {'value': result}
18
19 product_obj = self.pool.get('product.product')

Subscribers

People subscribed via source and target branches

to all changes: