diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-10-12 18:43:14 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-10-12 18:43:14 +0200 |
| commit | 945dd32eb02f91ae2e5d0ab6545704bd19e7f05a (patch) | |
| tree | 4b1a94fa6a259222996918a0995436e3225580d1 /addons/mail/models/mail_thread.py | |
| parent | ae9ed02f38039f17bf10777b28606d778876355d (diff) | |
| parent | 91e2264b284664067d2539d8f1d838809a0d65a2 (diff) | |
[MERGE] forward port branch saas-14 up to 91e2264b284
Diffstat (limited to 'addons/mail/models/mail_thread.py')
| -rw-r--r-- | addons/mail/models/mail_thread.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index bf7d41ffc72..c25c8a36b30 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -174,10 +174,10 @@ class MailThread(models.AbstractModel): RIGHT JOIN mail_channel_partner cp ON (cp.channel_id = rel.mail_channel_id AND cp.partner_id = %s AND (cp.seen_message_id IS NULL OR cp.seen_message_id < msg.id)) - WHERE msg.model = %s AND msg.res_id in %s AND + WHERE msg.model = %s AND msg.res_id = ANY(%s) AND (msg.author_id IS NULL OR msg.author_id != %s) AND (msg.message_type != 'notification' OR msg.model != 'mail.channel')""", - (partner_id, self._name, tuple(self.ids) or (None,), partner_id,)) + (partner_id, self._name, list(self.ids), partner_id,)) for result in self._cr.fetchall(): res[result[0]] += 1 |
