diff --git a/addons/mail/models/mail_template.py b/addons/mail/models/mail_template.py index 9691ed700b7..4aaada0ba56 100644 --- a/addons/mail/models/mail_template.py +++ b/addons/mail/models/mail_template.py @@ -252,17 +252,17 @@ class MailTemplate(models.Model): def unlink_action(self): for template in self: if template.ref_ir_act_window: - template.ref_ir_act_window.sudo().unlink() + template.ref_ir_act_window.unlink() return True @api.multi def create_action(self): - ActWindowSudo = self.env['ir.actions.act_window'].sudo() + ActWindow = self.env['ir.actions.act_window'] view = self.env.ref('mail.email_compose_message_wizard_form') for template in self: button_name = _('Send Mail (%s)') % template.name - action = ActWindowSudo.create({ + action = ActWindow.create({ 'name': button_name, 'type': 'ir.actions.act_window', 'res_model': 'mail.compose.message', diff --git a/addons/mail/views/mail_template_views.xml b/addons/mail/views/mail_template_views.xml index 077f3f6105f..d54cb59c957 100644 --- a/addons/mail/views/mail_template_views.xml +++ b/addons/mail/views/mail_template_views.xml @@ -10,6 +10,7 @@