From 9e8be4175b5ea230996669b5a33a8f695bf66df4 Mon Sep 17 00:00:00 2001 From: Rifakat Date: Mon, 6 Jan 2014 11:00:39 +0530 Subject: [PATCH] [FIX] crm: when loggin a phonecall from Opportunity, note added to the opportunity(message) having time as UTC and not in user's timezone bzr revid: rha@tinyerp.com-20140106053039-83domwm1bvrimq8l --- addons/crm/crm_lead.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index edc61b464f7..ba7482c413e 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -1065,7 +1065,9 @@ class crm_lead(base_stage, format_address, osv.osv): else: prefix = 'Scheduled' suffix = ' %s' % phonecall.description - message = _("%s a call for %s.%s") % (prefix, phonecall.date, suffix) + phonecall_date = datetime.strptime(phonecall.date, tools.DEFAULT_SERVER_DATETIME_FORMAT) + phonecall_usertime = fields.datetime.context_timestamp(cr, uid, phonecall_date, context=context).strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT) + message = _("%s a call for %s.%s") % (prefix, phonecall_usertime, suffix) return self.message_post(cr, uid, ids, body=message, context=context) def log_meeting(self, cr, uid, ids, meeting_subject, meeting_date, duration, context=None):