summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-04-11 15:26:27 +0200
committerThibault Delavallée <tde@odoo.com>2017-04-11 15:26:27 +0200
commitf3cff93f5c95d0007e8e4b54e4c7a1e803b4ea5b (patch)
treec602a59e25941dcb59656845771bd0ad32819e29 /addons
parent6afea0b96ab86f10a54d8b0be0aa20cd275e13e0 (diff)
[FIX] project: fix issue when subscribing people
Using the right field name is better.
Diffstat (limited to 'addons')
-rw-r--r--addons/project/models/project.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/project/models/project.py b/addons/project/models/project.py
index 4064e001f8f..ed029b1a4f3 100644
--- a/addons/project/models/project.py
+++ b/addons/project/models/project.py
@@ -270,7 +270,7 @@ class Project(models.Model):
def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, force=True):
""" Subscribe to all existing active tasks when subscribing to a project """
res = super(Project, self).message_subscribe(partner_ids=partner_ids, channel_ids=channel_ids, subtype_ids=subtype_ids, force=force)
- if not subtype_ids or any(subtype.parent_id.model == 'project.task' for subtype in self.env['mail.message.subtype'].browse(subtype_ids)):
+ if not subtype_ids or any(subtype.parent_id.res_model == 'project.task' for subtype in self.env['mail.message.subtype'].browse(subtype_ids)):
for partner_id in partner_ids or []:
self.mapped('tasks').filtered(lambda task: not task.stage_id.fold and partner_id not in task.message_partner_ids.ids).message_subscribe(
partner_ids=[partner_id], channel_ids=None, subtype_ids=None, force=False)