[FIX] email_template: format tz, do no display tz if none set
When displaying the datetime according to the lang in the context Otherwise, it displays '(False)' at the end of the datetime
This commit is contained in:
parent
f650522bbf
commit
4b756c599d
|
@ -60,7 +60,7 @@ def format_tz(pool, cr, uid, dt, tz=False, format=False, context=None):
|
|||
|
||||
fdate = ts.strftime(format_date)
|
||||
ftime = ts.strftime(format_time)
|
||||
return "%s %s (%s)" % (fdate, ftime, tz)
|
||||
return "%s %s%s" % (fdate, ftime, (' (%s)' % tz) if tz else '')
|
||||
|
||||
try:
|
||||
# We use a jinja2 sandboxed environment to render mako templates.
|
||||
|
|
Loading…
Reference in New Issue