[IMP] mail: add comment

bzr revid: chm@openerp.com-20121130145039-4wgxxp1wev9zkj97
This commit is contained in:
Christophe Matthieu 2012-11-30 15:50:39 +01:00
parent 1edd341f1f
commit 9d57b96273
1 changed files with 2 additions and 0 deletions

View File

@ -794,6 +794,8 @@ class mail_message(osv.Model):
notification_obj = self.pool.get('mail.notification')
notification_obj._notify(cr, uid, newid, context=context)
# An error appear when a user receive a notify to a message without notify to his parent message.
# Add a notification with read = true to the parented message if there are no notification
if message.get('parent_id') and message.get('parent_id')[0]:
partners_to_parent_notify = set(partners_to_notify) - set(self.read(cr, SUPERUSER_ID, message.get('parent_id')[0], ['notified_partner_ids'], context=context).get('notified_partner_ids'))
for partner_id in partners_to_parent_notify: