[FIX] mail: Speep improvement when sending email using 'Send by Email' wizard. (Maintenance Case: 606994)

This commit is contained in:
Ravi Gohil
2014-06-09 18:20:02 +05:30
parent 548c8e6675
commit 8796e07afc
+4 -2
View File
@@ -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])