From 82e60a964858b6e543200fc8078d8a692f003aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 5 Feb 2016 18:07:23 +0100 Subject: [PATCH] [FIX] mail: automatic subscription of responsible Do not erase existing subscription with void subtypes. --- addons/mail/models/mail_thread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index 670f9eea599..aefbe1a16ff 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -1956,10 +1956,10 @@ class MailThread(models.AbstractModel): for pid, subtypes in new_partners.items(): subtypes = list(subtypes) if subtypes is not None else None - self.message_subscribe(partner_ids=[pid], subtype_ids=subtypes) + self.message_subscribe(partner_ids=[pid], subtype_ids=subtypes, force=(subtypes != None)) for cid, subtypes in new_channels.items(): subtypes = list(subtypes) if subtypes is not None else None - self.message_subscribe(channel_ids=[cid], subtype_ids=subtypes) + self.message_subscribe(channel_ids=[cid], subtype_ids=subtypes, force=(subtypes != None)) # remove the current user from the needaction partner to avoid to notify the author of the message user_pids = [user_pid for user_pid in user_pids if user_pid != self.env.user.partner_id.id]