diff options
| author | Atul Patel (OpenERP) <atp@tinyerp.com> | 2012-09-24 18:21:39 +0530 |
|---|---|---|
| committer | Atul Patel (OpenERP) <atp@tinyerp.com> | 2012-09-24 18:21:39 +0530 |
| commit | 4199e2bfbb7e8d5ba2c5c8f07dc2c50c5184ef86 (patch) | |
| tree | 1dce458a8a3b7f3353b8372e257cc7c2aa7cb0e1 /addons/project_issue | |
| parent | 12834330511bb005df73d925bfbceb591b6fe515 (diff) | |
| parent | 771936b8360d4f6e290a5bb229848c996c03d0aa (diff) | |
[MERGE]: Merged lp:~openerp-dev/openobject-addons/trunk-auto_follow-atp-sales_auto_follow-pja
bzr revid: atp@tinyerp.com-20120924125139-uaw26laihpyk4u7o
Diffstat (limited to 'addons/project_issue')
| -rw-r--r-- | addons/project_issue/project_issue.py | 12 |
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 |
