[IMP]: Improve write method for project
bzr revid: atp@tinyerp.com-20120926162225-io7szog9omvd0sx6
This commit is contained in:
@@ -1114,6 +1114,10 @@ class task(base_stage, osv.osv):
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
for task in self.browse(cr, uid, ids, context=context):
|
||||
if task.project_id:
|
||||
vals.update({'message_follower_ids': [(4, follower.id) for follower in task.project_id.message_follower_ids]})
|
||||
|
||||
if vals and not 'kanban_state' in vals and 'stage_id' in vals:
|
||||
new_stage = vals.get('stage_id')
|
||||
vals_reset_kstate = dict(vals, kanban_state='normal')
|
||||
|
||||
Reference in New Issue
Block a user