From 5ae29848ead62b4c617bdaff92e092d08eefa469 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Wed, 21 Sep 2016 11:54:19 +0200 Subject: [PATCH] [FIX] calendar: event display time timezone If the method "_get_display_time" is called on an event and if the user or partner has no timezone set. The string returned by the function contains the value 'False' instead of a timezone. To fix this, we replaced the "False" value by "UTC", because UTC is the default timezone in Odoo. --- addons/calendar/models/calendar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/calendar/models/calendar.py b/addons/calendar/models/calendar.py index 1cee64407be..d9dfc5a41a0 100644 --- a/addons/calendar/models/calendar.py +++ b/addons/calendar/models/calendar.py @@ -616,7 +616,7 @@ class Meeting(models.Model): """ timezone = self._context.get('tz') if not timezone: - timezone = self.env.user.partner_id.tz + timezone = self.env.user.partner_id.tz or 'UTC' timezone = tools.ustr(timezone).encode('utf-8') # make safe for str{p,f}time() # get date/time format according to context