diff options
| author | Jay Vora (OpenERP) <jvo@tinyerp.com> | 2011-03-04 19:51:02 +0530 |
|---|---|---|
| committer | Jay Vora (OpenERP) <jvo@tinyerp.com> | 2011-03-04 19:51:02 +0530 |
| commit | 384eea70aa77b18ddff7d1d7c438c36170db88e4 (patch) | |
| tree | 53598a97ca496b5e91dc49e71bb60ef010c63242 | |
| parent | 1673f215a2447327b794428be58006e5a85c81a3 (diff) | |
[FIX/IMP/REF] CRM_phonecall : corrected pylint warnng suggested by Buildbot,improved and refactored the case_close() method for the call of write()
bzr revid: jvo@tinyerp.com-20110304142102-th9pzhxufqib9sh6
| -rw-r--r-- | addons/crm/crm_phonecall.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py index f4e20f5d3fc..6c8cefaefa6 100644 --- a/addons/crm/crm_phonecall.py +++ b/addons/crm/crm_phonecall.py @@ -24,7 +24,7 @@ from osv import fields, osv from tools.translate import _ import crm import time -from datetime import datetime, timedelta +from datetime import datetime class crm_phonecall(crm_case, osv.osv): """ Phonecall Cases """ @@ -112,13 +112,13 @@ class crm_phonecall(crm_case, osv.osv): """ res = True for phone in self.browse(cr, uid, ids): - phone_id= phone.id + phone_id = phone.id data = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')} if phone.duration <=0: duration = datetime.now() - datetime.strptime(phone.date, '%Y-%m-%d %H:%M:%S') data.update({'duration': duration.seconds/float(60)}) res = super(crm_phonecall, self).case_close(cr, uid, [phone_id], args) - self.write(cr, uid, ids, data) + self.write(cr, uid, [phone_id], data) return res def case_reset(self, cr, uid, ids, *args): |
