From e8fa670370dd3d6c1961314985a75612a853da9b Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Wed, 30 Mar 2011 14:04:03 +0530 Subject: [PATCH] [FIX] mrp_operations : Cancelling a Manufacturing Order is Now Possible.(Support Case:4634) bzr revid: ach@tinyerp.com-20110330083403-pd15sfs8mdqxy9mg --- addons/mrp_operations/mrp_operations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index df5456baa4a..1d30fbce397 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -244,10 +244,12 @@ class mrp_production(osv.osv): wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_start_working', cr) return super(mrp_production,self).action_in_production(cr, uid, ids) - def action_cancel(self, cr, uid, ids): + def action_cancel(self, cr, uid, ids,context=None): """ Cancels work order if production order is canceled. @return: Super method """ + if context is None: + context = {} obj = self.browse(cr, uid, ids)[0] wf_service = netsvc.LocalService("workflow") for workcenter_line in obj.workcenter_lines: