From 612cd6dbf07a5907d48863e6f26e6d329c71ca8e Mon Sep 17 00:00:00 2001 From: Fabian Semal Date: Wed, 6 Aug 2008 16:03:40 +0200 Subject: [PATCH] Bubfix for dates bzr revid: fabian@tinyerp.com-20080806140340-23pmx0ihuqbbga0a --- bin/report/report_sxw.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 76a50b95737..2568afdfcd8 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -189,11 +189,14 @@ class _date_format(str, _format): def __str__(self): if not self.object._context: return self.name + if self.name: - datedata = time.strptime(self.name, DT_FORMAT) - return time.strftime(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'), + try : + datedata = time.strptime(self.name, DT_FORMAT) + return time.strftime(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'), datedata) - return '' + except : + pass _fields_process = { 'float': _float_format,