[FIX] mail_quoted_reply: avoid access right errors when reading action.

This commit is contained in:
Lois Rilo 2022-10-03 11:36:03 +02:00 committed by jb
parent abcddf9c99
commit 52f2966e19

View File

@ -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,