[IMP] email_template: use button name as action name
The action name is what gets displayed in the sidebar and there is no reason to have a different name for the action and button anyway. lp bug: https://launchpad.net/bugs/886144 fixed bzr revid: odo@openerp.com-20120125174249-wxor3br5xbqtluld
This commit is contained in:
parent
f0fdfc450c
commit
a4a36695c7
|
@ -180,8 +180,9 @@ class email_template(osv.osv):
|
|||
src_obj = template.model_id.model
|
||||
model_data_id = data_obj._get_id(cr, uid, 'mail', 'email_compose_message_wizard_form')
|
||||
res_id = data_obj.browse(cr, uid, model_data_id, context=context).res_id
|
||||
button_name = _('Send Mail (%s)') % template.name
|
||||
vals['ref_ir_act_window'] = action_obj.create(cr, uid, {
|
||||
'name': template.name,
|
||||
'name': button_name,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'mail.compose.message',
|
||||
'src_model': src_obj,
|
||||
|
@ -193,7 +194,7 @@ class email_template(osv.osv):
|
|||
'auto_refresh':1
|
||||
}, context)
|
||||
vals['ref_ir_value'] = self.pool.get('ir.values').create(cr, uid, {
|
||||
'name': _('Send Mail (%s)') % template.name,
|
||||
'name': button_name,
|
||||
'model': src_obj,
|
||||
'key2': 'client_action_multi',
|
||||
'value': "ir.actions.act_window," + str(vals['ref_ir_act_window']),
|
||||
|
|
Loading…
Reference in New Issue