From 89d400f824ba89dc45bc6a982b7b74a64a5f29ed Mon Sep 17 00:00:00 2001 From: Tejas Tank Date: Fri, 1 Feb 2013 11:11:20 +0530 Subject: [PATCH] [IMP] mrp_repair: use the new signal_xxx methods instead of trg_validate. bzr revid: tta@openerp.com-20130201054120-lzah0vb83w3ff53z --- addons/mrp_repair/wizard/make_invoice.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/mrp_repair/wizard/make_invoice.py b/addons/mrp_repair/wizard/make_invoice.py index a6e93aca064..9442746d68e 100644 --- a/addons/mrp_repair/wizard/make_invoice.py +++ b/addons/mrp_repair/wizard/make_invoice.py @@ -19,7 +19,6 @@ # ############################################################################## -from openerp import netsvc from openerp.osv import fields, osv class make_invoice(osv.osv_memory): @@ -50,9 +49,7 @@ class make_invoice(osv.osv_memory): # We have to trigger the workflow of the given repairs, otherwise they remain 'to be invoiced'. # Note that the signal 'action_invoice_create' will trigger another call to the method 'action_invoice_create', # but that second call will not do anything, since the repairs are already invoiced. - wf_service = netsvc.LocalService("workflow") - for repair_id in context['active_ids']: - wf_service.trg_validate(uid, 'mrp.repair', repair_id, 'action_invoice_create', cr) + order_obj.signal_action_invoice_create(cr, uid, context['active_ids']) form_res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form') form_id = form_res and form_res[1] or False