diff --git a/addons/project/project.py b/addons/project/project.py index 30f706d69d3..7a73778b469 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1100,10 +1100,9 @@ class task(base_stage, osv.osv): def create(self, cr, uid, vals, context=None): task_id = super(task, self).create(cr, uid, vals, context=context) - project_obj = self.pool.get("project.project") project_id = self.browse(cr, uid, task_id, context=context).project_id if project_id: - follower_ids = project_obj.browse(cr, uid, project_id.id, context=context).message_follower_ids + follower_ids = self.pool.get("project.project").browse(cr, uid, project_id.id, context=context).message_follower_ids followers = [follower.id for follower in follower_ids] self.message_subscribe(cr, uid, task_id, followers, context=context) self._store_history(cr, uid, [task_id], context=context) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 27d1d9d0a15..10a879ffdc0 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -381,9 +381,8 @@ class project_issue(base_stage, osv.osv): def create(self, cr, uid, vals, context=None): obj_id = super(project_issue, self).create(cr, uid, vals, context=context) - project_obj = self.pool.get("project.project") project_id = self.browse(cr, uid, obj_id, context=context).project_id - follower_ids = project_obj.browse(cr, uid, project_id.id, context=context).message_follower_ids + follower_ids = self.pool.get("project.project").browse(cr, uid, project_id.id, context=context).message_follower_ids followers = [follower.id for follower in follower_ids] self.message_subscribe(cr, uid, obj_id, followers, context=context) self.create_send_note(cr, uid, [obj_id], context=context)