From 0b684b950f45067bb7f322c930be0b80171a7a5f Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 9 Apr 2015 10:18:12 +0200 Subject: [PATCH] [FIX] mrp_operations: missing params in overriding methods The context wasn't defined in the below methods: - action_production_end - action_in_production while it is defined in the base methods, in the mrp module. This doesn't lead to any issue in standard modules, but it prevents to correctly override these methods within custom modules when mrp_operations is installed. opw-632425 --- addons/mrp_operations/mrp_operations.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index d31adf9a94f..d841e344a9e 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -223,7 +223,7 @@ class mrp_production(osv.osv): result[prod.id] = max(line.date_planned_end, result[prod.id]) return result - def action_production_end(self, cr, uid, ids): + def action_production_end(self, cr, uid, ids, context=None): """ Finishes work order if production order is done. @return: Super method """ @@ -233,9 +233,9 @@ class mrp_production(osv.osv): if workcenter_line.state == 'draft': wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_start_working', cr) wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_done', cr) - return super(mrp_production,self).action_production_end(cr, uid, ids) + return super(mrp_production,self).action_production_end(cr, uid, ids, context=context) - def action_in_production(self, cr, uid, ids): + def action_in_production(self, cr, uid, ids, context=None): """ Changes state to In Production and writes starting date. @return: True """ @@ -245,7 +245,7 @@ class mrp_production(osv.osv): for prod in self.browse(cr, uid, ids): if prod.workcenter_lines: wf_service.trg_validate(uid, 'mrp.production.workcenter.line', prod.workcenter_lines[0].id, 'button_start_working', cr) - return super(mrp_production,self).action_in_production(cr, uid, ids) + return super(mrp_production,self).action_in_production(cr, uid, ids, context=context) def action_cancel(self, cr, uid, ids, context=None): """ Cancels work order if production order is canceled.