From 4b756c599d478fbb20b29cd4f5324f37884a1434 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 29 Jan 2015 14:47:19 +0100 Subject: [PATCH] [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 --- addons/email_template/email_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index dea832c7a44..a6e7a0108d2 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -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.