summaryrefslogtreecommitdiff
path: root/addons/project_issue/project_issue.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/project_issue/project_issue.py')
-rw-r--r--addons/project_issue/project_issue.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index ea3a892eb32..805d29eb98d 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -379,16 +379,12 @@ class project_issue(base_stage, osv.osv):
self.write(cr, uid, ids, {'date_open': False, 'date_closed': False})
return res
- def project_message_followers(self, cr, uid, issue_id, context=None):
- project_obj = self.pool.get("project.project")
- project_id = self.browse(cr, uid, issue_id, context=context).project_id
- followers = [follower.id for follower in project_obj.browse(cr, uid, project_id.id, context=context).message_follower_ids]
- self.message_subscribe(cr, uid, issue_id, followers, context=context)
- return True
-
def create(self, cr, uid, vals, context=None):
obj_id = super(project_issue, self).create(cr, uid, vals, context=context)
- self.project_message_followers(cr, uid, obj_id, context=context)
+ project_obj = self.pool.get("project.project")
+ project_id = self.browse(cr, uid, obj_id, context=context).project_id
+ followers = [follower.id for follower in project_id.message_follower_ids]
+ self.message_subscribe(cr, uid, [obj_id], followers, context=context)
self.create_send_note(cr, uid, [obj_id], context=context)
return obj_id