From 384eea70aa77b18ddff7d1d7c438c36170db88e4 Mon Sep 17 00:00:00 2001 From: "Jay Vora (OpenERP)" Date: Fri, 4 Mar 2011 19:51:02 +0530 Subject: [PATCH] [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 --- addons/crm/crm_phonecall.py | 6 +++--- 1 file 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):