[IMP] mrp_repair: use the new signal_xxx methods instead of trg_validate.
bzr revid: tta@openerp.com-20130201054120-lzah0vb83w3ff53z
This commit is contained in:
parent
191a095164
commit
89d400f824
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue