From 89e6beff36bc7fed3ef6973e908220224bb7358b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Tue, 11 Jul 2023 18:02:52 +0000 Subject: [PATCH] [FIX] mail: allow message edit when livechat is installed Livechat override of `_message_update_content` accesses `self` channel but it was not called with the guest env, leading to access error. Part-of: odoo/odoo#128290 --- addons/mail/controllers/thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/controllers/thread.py b/addons/mail/controllers/thread.py index 1227a2c3de1..02024f31219 100644 --- a/addons/mail/controllers/thread.py +++ b/addons/mail/controllers/thread.py @@ -97,6 +97,6 @@ class ThreadController(http.Controller): raise NotFound() if not message_sudo.model or not message_sudo.res_id: raise NotFound() - request.env[message_sudo.model].browse([message_sudo.res_id])._message_update_content( + guest.env[message_sudo.model].browse([message_sudo.res_id])._message_update_content( message_sudo, body, attachment_ids=attachment_ids, partner_ids=partner_ids )