summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-04-05 23:14:54 +0200
committerThibault Delavallée <tde@openerp.com>2012-04-05 23:14:54 +0200
commit6148e1450aa0efeacedfc8fb9c77cdcc0605eea4 (patch)
tree3a547df5aacbe16443cd25524c556c8e2f73de3a
parent536b08b2f46df8e0a219bcd4fd604c6df39b9d30 (diff)
[IMP] mail.thread: Boardcasting is not done in install mode.
bzr revid: tde@openerp.com-20120405211454-4zvkc0e37dgr2riv
-rw-r--r--addons/mail/mail_thread.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index b87084cc509..20341bb01f4 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -692,6 +692,11 @@ class mail_thread(osv.osv):
notification_obj = self.pool.get('mail.notification')
# write message
msg_ids = self.message_append_note(cr, uid, ids, subject=subject, body=body, parent_id=parent_id, type=type, subtype=subtype, context=context)
+ # escape if in install mode or note writing was not successfull
+ if 'install_mode' in context:
+ return True
+ if not isinstance(msg_ids(list)):
+ return True
# get already existing notigications
notification_ids = notification_obj.search(cr, uid, [('message_id', 'in', msg_ids)], context=context)
already_pushed_user_ids = map(itemgetter('user_id'), notification_obj.read(cr, uid, notification_ids, context=context))