[IMP] improve the code
bzr revid: rma@tinyerp.com-20121126105927-a7br219gcmswj8jz
This commit is contained in:
parent
748b4ac453
commit
71b035a4b0
|
@ -393,8 +393,13 @@ class purchase_order(osv.osv):
|
|||
compose_form_id = ir_model_data.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')[1]
|
||||
except ValueError:
|
||||
compose_form_id = False
|
||||
ctx = dict(context, active_model='purchase.order', active_id=ids[0])
|
||||
ctx.update({'mail.compose.template_id': template_id})
|
||||
ctx = dict(context)
|
||||
ctx.update({
|
||||
'default_model': 'purchase.order',
|
||||
'default_res_id': ids[0],
|
||||
'default_use_template': True,
|
||||
'default_template_id': template_id,
|
||||
})
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
|
|
Loading…
Reference in New Issue