summaryrefslogtreecommitdiff
path: root/addons/mail/mail_message.py
diff options
context:
space:
mode:
authorRavi Gohil <rgo@tinyerp.com>2014-06-09 18:20:02 +0530
committerRavi Gohil <rgo@tinyerp.com>2014-06-09 18:20:02 +0530
commit8796e07afcecfccfe5b09cf0f9cb79e93024f1e6 (patch)
tree7e32868601132e278547a9c7c0c7881edc0800e4 /addons/mail/mail_message.py
parent548c8e6675557029037e0aa59e805300982549cb (diff)
[FIX] mail: Speep improvement when sending email using 'Send by Email' wizard. (Maintenance Case: 606994)
Diffstat (limited to 'addons/mail/mail_message.py')
-rw-r--r--addons/mail/mail_message.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index 4280983f288..3f491df82b7 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -881,9 +881,11 @@ class mail_message(osv.Model):
fol_ids = fol_obj.search(cr, SUPERUSER_ID, [
('res_model', '=', message.model),
('res_id', '=', message.res_id),
- ('subtype_ids', 'in', message.subtype_id.id)
], context=context)
- partners_to_notify |= set(fo.partner_id for fo in fol_obj.browse(cr, SUPERUSER_ID, fol_ids, context=context))
+ partners_to_notify |= set(
+ fo.partner_id for fo in fol_obj.browse(cr, SUPERUSER_ID, fol_ids, context=context)
+ if message.subtype_id.id in [st.id for st in fo.subtype_ids]
+ )
# remove me from notified partners, unless the message is written on my own wall
if message.author_id and message.model == "res.partner" and message.res_id == message.author_id.id:
partners_to_notify |= set([message.author_id])