diff options
Diffstat (limited to 'addons/mail/mail_thread.py')
| -rw-r--r-- | addons/mail/mail_thread.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index bb5d94843fc..ac2b0efb670 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -213,8 +213,11 @@ class mail_thread(osv.AbstractModel): def create(self, cr, uid, vals, context=None): """ Override to subscribe the current user. """ + if context is None: + context = {} thread_id = super(mail_thread, self).create(cr, uid, vals, context=context) - self.message_subscribe_users(cr, uid, [thread_id], [uid], context=context) + if not context.get('mail_nosubscribe'): + self.message_subscribe_users(cr, uid, [thread_id], [uid], context=context) return thread_id def unlink(self, cr, uid, ids, context=None): |
