From a4a36695c7d33da90fa89f9c46cb6fdb04a3a852 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 25 Jan 2012 18:42:49 +0100 Subject: [PATCH] [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 --- addons/email_template/email_template.py | 5 +++-- 1 file 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']),