summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
diff options
context:
space:
mode:
authorPriyanka Kakadiya <pka@odoo.com>2019-11-05 06:50:11 +0000
committerAlexandre Kühn <aku@odoo.com>2020-01-17 10:04:54 +0000
commit16dd3da7a95bdbef925c1521455a55bfe2fd4357 (patch)
tree44a6624ac52bc7389ea55bc4da5ccd54414e7484 /addons/mail/models/mail_thread.py
parent6afb7074e47459159b04a10a80d54557f3df4d7a (diff)
[IMP] mail: auto follow subtypes based parent record at creation
With this commit, when the user subscribes to internal subtypes (i.e. activities and notes) on a parent record (e.g. project of tasks), then the user follows them by default on every record creation (e.g. all new tasks of this project). Task-Id 1974055 Closes #34150
Diffstat (limited to 'addons/mail/models/mail_thread.py')
-rw-r--r--addons/mail/models/mail_thread.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
index 6ca54653d87..bea8b37b867 100644
--- a/addons/mail/models/mail_thread.py
+++ b/addons/mail/models/mail_thread.py
@@ -2862,7 +2862,7 @@ class MailThread(models.AbstractModel):
res = self.env['mail.followers']._get_subscription_data(doc_data, None, None, include_pshare=True)
for fid, rid, pid, cid, subtype_ids, pshare in res:
sids = [parent[sid] for sid in subtype_ids if parent.get(sid)]
- sids += [sid for sid in subtype_ids if sid not in parent and sid in def_ids]
+ sids += [sid for sid in subtype_ids if sid not in parent and sid in def_ids or sid in int_ids]
if pid:
new_partners[pid] = (set(sids) & set(all_ids)) - set(int_ids) if pshare else set(sids) & set(all_ids)
if cid: