diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-11-28 17:44:46 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-11-28 17:44:46 +0100 |
| commit | efe7ca16b77edce73bf538ccb70678a52afdfd1d (patch) | |
| tree | ad5af92d3bb397fd58fd861e6ce8e3abd2902ec6 /addons/mail/models/mail_thread.py | |
| parent | b09f624f20781d65baf2060df40383898e6f86e5 (diff) | |
| parent | bb6f6c57f97b091f3f68161039de980eb9ce739d (diff) | |
[MERGE] forward port branch 11.0 up to bb6f6c57f97
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 f21de36c28f..25ba71e0e75 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -191,6 +191,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 |
