Nimesh Contractor(Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-auto_follow-atp-auto_follow_project-nco
into lp:~openerp-dev/openobject-addons/trunk-auto_follow-atp.
Requested reviews:
Atul Patel(OpenERP) (atp-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-auto_follow-atp-auto_follow_project-nco/+merge/125978
Hello sir,
I have add the auto follow functionality for the issue and task for
the project.
Thanks,
NCO.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-auto_follow-atp-auto_follow_project-nco/+merge/125978
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-auto_follow-atp.
=== modified file 'project/project.py'
--- project/project.py 2012-09-12 15:00:54 +0000
+++ project/project.py 2012-09-24 11:24:20 +0000
@@ -1100,6 +1100,11 @@
def create(self, cr, uid, vals, context=None):
task_id = super(task, self).create(cr, uid, vals, context=context)
+ project_id = self.browse(cr, uid, task_id, context=context).project_id
+ if project_id:
+ 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)
self.create_send_note(cr, uid, [task_id], context=context)
return task_id
=== modified file 'project_issue/project_issue.py'
--- project_issue/project_issue.py 2012-09-06 16:18:12 +0000
+++ project_issue/project_issue.py 2012-09-24 11:24:20 +0000
@@ -381,6 +381,10 @@
def create(self, cr, uid, vals, context=None):
obj_id = super(project_issue, self).create(cr, uid, vals, context=context)
+ project_id = self.browse(cr, uid, obj_id, context=context).project_id
+ 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)
return obj_id
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp