From 4fa8fda51a38ee42027c451350df5853485e3662 Mon Sep 17 00:00:00 2001 From: eLBati Date: Wed, 22 Jul 2020 12:26:59 +0200 Subject: [PATCH] FIX mail_outbound_static using sudo to get ir.config_parameter, otherwise when normal users try to send email they get AccessError --- mail_outbound_static/models/ir_mail_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail_outbound_static/models/ir_mail_server.py b/mail_outbound_static/models/ir_mail_server.py index e002b4658..83502a129 100644 --- a/mail_outbound_static/models/ir_mail_server.py +++ b/mail_outbound_static/models/ir_mail_server.py @@ -34,7 +34,7 @@ class IrMailServer(models.Model): email_from = mail_server.smtp_from message.replace_header('From', email_from) - bounce_alias = self.env['ir.config_parameter'].get_param( + bounce_alias = self.env['ir.config_parameter'].sudo().get_param( "mail.bounce.alias") if not bounce_alias: # then, bounce handling is disabled and we want