Merge lp:~openerp-dev/openobject-addons/7.0-opw-593459-pna into lp:openobject-addons/7.0

Proposed by Pinakin Nayi (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-593459-pna
Merge into: lp:openobject-addons/7.0
Diff against target: 15 lines (+2/-0)
1 file modified
project/project.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-593459-pna
Reviewer Review Type Date Requested Status
Csaba TOTH (community) Needs Fixing
Naresh(OpenERP) Pending
Review via email: mp+168848@code.launchpad.net

Description of the change

Hello Sir,

I improved project task.

Steps to reproduce :
 - Create a Project and add followers.
 - Create a task without a project and assign it to a user or add followers.
 - Edit the new task and assign it to the new project.

The user who was assigned to the task or followers are deleted from the follower list after assign the task to the project.(its add project followers)

Can find a demonstrative video here:
http://www.youtube.com/watch?v=mo2wYDL0Ijc

Expected Result :
A followers merge between the user who owns the task or task followers and the followers of the project.

Bug: https://bugs.launchpad.net/openobject-addons/+bug/1188017

Thanks,
pna

To post a comment you must log in.
Revision history for this message
Csaba TOTH (tsabi) wrote :

This patch now conflicts with rev 9270

review: Needs Fixing

Unmerged revisions

9203. By Pinakin Nayi (OpenERP)

[IMP]project: if we add project in task than it will not merge existing followers

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'project/project.py'
--- project/project.py 2013-06-07 11:38:29 +0000
+++ project/project.py 2013-06-12 05:05:25 +0000
@@ -1121,9 +1121,11 @@
1121 ids = [ids]1121 ids = [ids]
1122 if vals.get('project_id'):1122 if vals.get('project_id'):
1123 project_id = self.pool.get('project.project').browse(cr, uid, vals.get('project_id'), context=context)1123 project_id = self.pool.get('project.project').browse(cr, uid, vals.get('project_id'), context=context)
1124 task_id = self.browse(cr, uid, ids, context=context)[0]
1124 if project_id:1125 if project_id:
1125 vals.setdefault('message_follower_ids', [])1126 vals.setdefault('message_follower_ids', [])
1126 vals['message_follower_ids'] += [(6, 0,[follower.id]) for follower in project_id.message_follower_ids]1127 vals['message_follower_ids'] += [(6, 0,[follower.id]) for follower in project_id.message_follower_ids]
1128 vals['message_follower_ids'] += [(6, 0,[follower.id]) for follower in task_id.message_follower_ids]
1127 if vals and not 'kanban_state' in vals and 'stage_id' in vals:1129 if vals and not 'kanban_state' in vals and 'stage_id' in vals:
1128 new_stage = vals.get('stage_id')1130 new_stage = vals.get('stage_id')
1129 vals_reset_kstate = dict(vals, kanban_state='normal')1131 vals_reset_kstate = dict(vals, kanban_state='normal')