From 2e68b131607c54dd4a1e083a043e5b1908ec702d Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 15 Nov 2022 15:52:43 +0000 Subject: [PATCH] [FIX] mail: incorrect flush in mail_message._search() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes odoo/odoo#105869 X-original-commit: 7ecef516e364d922d7f92972e2269e6ed33c895a Signed-off-by: Rémy Voet Signed-off-by: Raphael Collet --- addons/mail/models/mail_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_message.py b/addons/mail/models/mail_message.py index 4cd555a994b..e46d2663a45 100644 --- a/addons/mail/models/mail_message.py +++ b/addons/mail/models/mail_message.py @@ -295,7 +295,7 @@ class Message(models.Model): # check read access rights before checking the actual rules on the given ids super(Message, self.with_user(access_rights_uid or self._uid)).check_access_rights('read') - self.flush_recordset(['model', 'res_id', 'author_id', 'message_type', 'partner_ids']) + self.flush_model(['model', 'res_id', 'author_id', 'message_type', 'partner_ids']) self.env['mail.notification'].flush_model(['mail_message_id', 'res_partner_id']) for sub_ids in self._cr.split_for_in_conditions(ids): self._cr.execute("""