X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=addons%2Fmrp_operations%2Fmrp_operations.py;fp=addons%2Fmrp_operations%2Fmrp_operations.py;h=b41dc63c5171d0101f4be8312143452f1044ccde;hb=fcd06145dda957a83e687fd033ff294c407da5f4;hp=043acb70c7d8265a1d28862cbba786486dbe8dd0;hpb=d9610efd979c974e540353716f8d0b9ecdb9d952;p=odoo%2Fodoo.git diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 043acb7..b41dc63 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -207,17 +207,17 @@ 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 """ - obj = self.browse(cr, uid, ids)[0] + obj = self.browse(cr, uid, ids, context=context)[0] workcenter_pool = self.pool.get('mrp.production.workcenter.line') for workcenter_line in obj.workcenter_lines: if workcenter_line.state == 'draft': workcenter_line.signal_workflow('button_start_working') workcenter_line.signal_workflow('button_done') - 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): """ Changes state to In Production and writes starting date.