[FIX] mail: incorrect flush in mail_message._search()

closes odoo/odoo#105869

X-original-commit: 7ecef516e364d922d7f92972e2269e6ed33c895a
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
Raphael Collet
2022-11-16 15:21:06 +01:00
parent a2f4a53148
commit 2e68b13160
+1 -1
View File
@@ -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("""