[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
This commit is contained in:
parent
7b7b0d148a
commit
0b684b950f
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue