diff options
| author | Priyanka kakadiya <pka@odoo.com> | 2020-11-26 16:06:00 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2021-01-19 16:33:22 +0000 |
| commit | f29e9e5edbe08e1a356ceb7c2dbb2f60fb6d3ff5 (patch) | |
| tree | ca240f675d545d9b4f079f0fbcda3200d2b15977 /addons/project/models/project.py | |
| parent | 01254f06e8ea37887e190758cc479a098591ab8e (diff) | |
[FW][FIX] project: propagate internal subtypes to tasks
before this commit:
while changing subtypes of the project it was only
propagating those subtypes to the task, whose parent_id is set.
internal subtypes are not propagating in the task of a project.
So, filter internal subtypes and concat them with the subtypes which
have parent_id.
after this commit:
internal subtypes will also propagate to their tasks
closes odoo/odoo#62495
X-original-commit: odoo/odoo@2ad320e9050160725601b82fa6239c94aad93d20
X-original-pr: odoo/odoo#47336
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/project/models/project.py')
| -rw-r--r-- | addons/project/models/project.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/project/models/project.py b/addons/project/models/project.py index f53705dc138..42c3ca7bec6 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -423,7 +423,7 @@ class Project(models.Model): """ res = super(Project, self).message_subscribe(partner_ids=partner_ids, channel_ids=channel_ids, subtype_ids=subtype_ids) project_subtypes = self.env['mail.message.subtype'].browse(subtype_ids) if subtype_ids else None - task_subtypes = project_subtypes.mapped('parent_id').ids if project_subtypes else None + task_subtypes = (project_subtypes.mapped('parent_id') | project_subtypes.filtered(lambda sub: sub.internal or sub.default)).ids if project_subtypes else None if not subtype_ids or task_subtypes: self.mapped('tasks').message_subscribe( partner_ids=partner_ids, channel_ids=channel_ids, subtype_ids=task_subtypes) |
