[FIX] crm: meeting time in user timezone

With UTC in <time> element in bonus.
opw 621772
This commit is contained in:
Rucha Dave 2015-01-15 17:27:47 +05:30 committed by Martin Trigaux
parent 433feb5a38
commit 2596f39eef
1 changed files with 4 additions and 1 deletions

View File

@ -1071,7 +1071,10 @@ class crm_lead(format_address, osv.osv):
duration = _('unknown')
else:
duration = str(duration)
message = _("Meeting scheduled at '%s'<br> Subject: %s <br> Duration: %s hour(s)") % (meeting_date, meeting_subject, duration)
meet_date = datetime.strptime(meeting_date, tools.DEFAULT_SERVER_DATETIME_FORMAT)
meeting_usertime = fields.datetime.context_timestamp(cr, uid, meet_date, context=context).strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)
html_time = "<time datetime='%s+00:00'>%s</time>" % (meeting_date, meeting_usertime)
message = _("Meeting scheduled at '%s'<br> Subject: %s <br> Duration: %s hour(s)") % (html_time, meeting_subject, duration)
return self.message_post(cr, uid, ids, body=message, context=context)
def onchange_state(self, cr, uid, ids, state_id, context=None):