From 82b3e9b5fdbab7edfe949a54a6eb25675db88b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 20 Mar 2013 09:40:11 +0100 Subject: [PATCH] [FIX] mail: mail_create_nosubscribe context key also supported in message_post: allows to avoid subscribing the author to the document. bzr revid: tde@openerp.com-20130320084011-coyf9p1il2ue04bb --- addons/mail/mail_thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 1a516db9070..51cbba38ba1 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -1029,7 +1029,7 @@ class mail_thread(osv.AbstractModel): # Create and auto subscribe the author msg_id = mail_message.create(cr, uid, values, context=context) message = mail_message.browse(cr, uid, msg_id, context=context) - if message.author_id and thread_id and type != 'notification': + if message.author_id and thread_id and type != 'notification' and not context.get('mail_create_nosubscribe'): self.message_subscribe(cr, uid, [thread_id], [message.author_id.id], context=context) return msg_id