diff options
| author | Hemendra Paregi (Open ERP) <hpa@tinyerp.com> | 2011-11-15 11:37:46 +0530 |
|---|---|---|
| committer | Hemendra Paregi (Open ERP) <hpa@tinyerp.com> | 2011-11-15 11:37:46 +0530 |
| commit | fb0e35d1ed90b89e04faf3d41a6d217caa2f5a5a (patch) | |
| tree | ba3b3a1f0b345df68f6b5febf45615bf2331234c /addons | |
| parent | 6b90a0704994dc7f770a214edf6a1faa15ca74fc (diff) | |
[IMP]project_issue:Override Write Method
bzr revid: hpa@tinyerp.com-20111115060746-dqw18i5kvzx59fn1
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/project_issue/project_issue.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 0833cab7441..e85d793f878 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -48,6 +48,18 @@ class project_issue(crm.crm_case, osv.osv): _order = "priority, create_date desc" _inherit = ['mail.thread'] + def write(self, cr, uid, ids, vals, context=None): + # update last action date + # - EveryTime the user change a stage is changed + # - EveryTime the user change the state + # - EveryTime the user send a new email + + attrs = ['type_id', 'state', 'message_ids'] + for attr in attrs: + if attr in vals: + vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S') + return super(project_issue, self).write(cr, uid, ids, vals, context) + def case_open(self, cr, uid, ids, *args): """ @param self: The object pointer |
