[FIX] mail: automatic subscription of responsible
Do not erase existing subscription with void subtypes.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user