From 52f2966e19409d682f9cf38def07099668f14b25 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 3 Oct 2022 11:36:03 +0200 Subject: [PATCH] [FIX] mail_quoted_reply: avoid access right errors when reading action. --- mail_quoted_reply/models/mail_message.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mail_quoted_reply/models/mail_message.py b/mail_quoted_reply/models/mail_message.py index 7adfc54..a401140 100644 --- a/mail_quoted_reply/models/mail_message.py +++ b/mail_quoted_reply/models/mail_message.py @@ -28,7 +28,9 @@ class MailMessage(models.Model): ) def reply_message(self): - action = self.env.ref("mail.action_email_compose_message_wizard").read()[0] + action = self.env["ir.actions.actions"]._for_xml_id( + "mail.action_email_compose_message_wizard" + ) action["context"] = { "default_model": self.model, "default_res_id": self.res_id,