Merge lp:~openerp-dev/openobject-addons/6.1-opw-584913-nep into lp:openobject-addons/6.1

Proposed by Nehal Panchal (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-584913-nep
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+2/-0)
1 file modified
stock/stock.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-584913-nep
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+145773@code.launchpad.net

Description of the change

Hello,

You can scrap more quantity of product than available move quantity.

This fixes the issue.

Thanks

To post a comment you must log in.

Unmerged revisions

7139. By Nehal Panchal (OpenERP)

[FIX] stock : Fixed the issue for not allowing to scrap more than available move quantity

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-10-05 07:47:57 +0000
3+++ stock/stock.py 2013-01-31 05:42:23 +0000
4@@ -2347,6 +2347,8 @@
5 res = []
6 for move in self.browse(cr, uid, ids, context=context):
7 move_qty = move.product_qty
8+ if move_qty < quantity:
9+ raise osv.except_osv(_('Warning'), _('Not allowed to scrap more than available move quantity'))
10 uos_qty = quantity / move_qty * move.product_uos_qty
11 default_val = {
12 'product_qty': quantity,