Merge lp:~openerp-dev/openobject-addons/6.1-opw-584804-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-584804-nep
Merge into: lp:openobject-addons/6.1
Diff against target: 13 lines (+2/-1)
1 file modified
mrp/wizard/change_production_qty.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-584804-nep
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+145565@code.launchpad.net

Description of the change

Hello,

If main product has BoM without any components and if you change the quantity of that product from "Change Qty" wizard in Manufacturing Order, it will raise an error.

This fixes the issue.

Thanks.

To post a comment you must log in.

Unmerged revisions

7138. By Nehal Panchal (OpenERP)

[FIX] mrp : if change the quantity of product in MO and if the main product has BoM without any components, it will raise the traceback

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp/wizard/change_production_qty.py'
2--- mrp/wizard/change_production_qty.py 2012-05-07 11:38:13 +0000
3+++ mrp/wizard/change_production_qty.py 2013-01-30 09:58:26 +0000
4@@ -73,7 +73,8 @@
5 prod_obj.write(cr, uid,prod.id, {'product_qty': wiz_qty.product_qty})
6 prod_obj.action_compute(cr, uid, [prod.id])
7 move_lines = prod.move_lines
8- move_lines.extend(prod.picking_id.move_lines)
9+ if move_lines:
10+ move_lines.extend(prod.picking_id.move_lines)
11
12 move_lines_obj = self.pool.get('stock.move')
13 for move in move_lines: