[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.
This commit is contained in:
Pierre Masereel
2016-09-21 11:54:19 +02:00
parent aaf5e6c3fb
commit 5ae29848ea
+1 -1
View File
@@ -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