Merge lp:~openerp-dev/openobject-addons/6.0-opw_cancel_mo_4634-ach into lp:openobject-addons/6.0

Proposed by Anup(SerpentCS)
Status: Merged
Merged at revision: 4493
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw_cancel_mo_4634-ach
Merge into: lp:openobject-addons/6.0
Diff against target: 17 lines (+3/-1)
1 file modified
mrp_operations/mrp_operations.py (+3/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw_cancel_mo_4634-ach
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) (community) Approve
Review via email: mp+55490@code.launchpad.net

Description of the change

Hello,

   When mrp_operations installed it's not possible to cancel a manufacturing order.

This solution fixes the issue.

Thanks.

To post a comment you must log in.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp_operations/mrp_operations.py'
2--- mrp_operations/mrp_operations.py 2011-01-14 00:11:01 +0000
3+++ mrp_operations/mrp_operations.py 2011-03-30 08:49:50 +0000
4@@ -244,10 +244,12 @@
5 wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_start_working', cr)
6 return super(mrp_production,self).action_in_production(cr, uid, ids)
7
8- def action_cancel(self, cr, uid, ids):
9+ def action_cancel(self, cr, uid, ids,context=None):
10 """ Cancels work order if production order is canceled.
11 @return: Super method
12 """
13+ if context is None:
14+ context = {}
15 obj = self.browse(cr, uid, ids)[0]
16 wf_service = netsvc.LocalService("workflow")
17 for workcenter_line in obj.workcenter_lines: