diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-11-29 18:38:55 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-11-29 18:38:55 +0100 |
| commit | f5c3dafb045f4eb5e832c45596dd59396667ea09 (patch) | |
| tree | 8265091d53c54dfa47e5a67f00e98cfda404ade2 /addons/mail/models/mail_thread.py | |
| parent | 5644ab53ab6f370a2fb48242e22702655afd6655 (diff) | |
| parent | c0eef4271110ebcab07811328a7b3f4309fb4d06 (diff) | |
[MERGE] forward port branch saas-11.3 up to c0eef427111
Diffstat (limited to 'addons/mail/models/mail_thread.py')
| -rw-r--r-- | addons/mail/models/mail_thread.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index f7cddd2525d..a1294502c1d 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -199,6 +199,8 @@ class MailThread(models.AbstractModel): @api.multi def _get_message_needaction(self): res = dict((res_id, 0) for res_id in self.ids) + if not res: + return # search for unread messages, directly in SQL to improve performances self._cr.execute(""" SELECT msg.res_id FROM mail_message msg |
