summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2012-01-25 18:42:49 +0100
committerOlivier Dony <odo@openerp.com>2012-01-25 18:42:49 +0100
commita4a36695c7d33da90fa89f9c46cb6fdb04a3a852 (patch)
tree2930469410cc9592e6c38b39d90c9e9acdbcf3b8 /addons
parentf0fdfc450cba3d994ee511f24f2149e5dbbdd30f (diff)
[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
Diffstat (limited to 'addons')
-rw-r--r--addons/email_template/email_template.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index fe4155cb236..35803c21864 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -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']),