From 78a4f3eab23a23eebd3fb5abc85fa14f9f59bb5c Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Tue, 20 Nov 2012 18:05:13 +0530 Subject: [PATCH] [IMP] add the state chnage in project issue bzr revid: rma@tinyerp.com-20121120123513-or712ebsxk5ao2rq --- addons/project_issue/project_issue.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 90640363906..5f53e1db496 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -387,6 +387,10 @@ class project_issue(base_stage, osv.osv): def write(self, cr, uid, ids, vals, context=None): #Update last action date every time the user change the stage, the state or send a new email logged_fields = ['stage_id', 'state', 'message_ids'] + if 'stage_id' in vals: + for t in self.browse(cr, uid, ids, context=context): + new_stage = vals.get('stage_id') + self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context) if any([field in vals for field in logged_fields]): vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')