Skip to content

Commit

Permalink
[13.0] [FIX] report_aeroo: For user without tz configurated, use UTC.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomacr committed Jul 27, 2021
1 parent c6eeef2 commit 48bd412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion report_aeroo/report_parser.py
Expand Up @@ -358,7 +358,7 @@ def _format_lang(
if date:
# we force the timezone of the user if the value is datetime
if isinstance(value, (datetime.datetime)):
value = value.astimezone(pytz.timezone(self.env.user.tz))
value = value.astimezone(pytz.timezone(self.env.user.tz or 'UTC'))
return odoo_fd(self.env, value, lang_code=lang_code, date_format=date_format)
elif date_time:
return format_datetime(self.env, value, lang_code=lang_code, date_format=date_format, tz=self.env.user.tz)
Expand Down

0 comments on commit 48bd412

Please sign in to comment.