From 34a41139f05ad75a19e38ae87f5da7ab6b2897d0 Mon Sep 17 00:00:00 2001 From: csn-openerp Date: Fri, 8 Feb 2013 14:57:04 +0100 Subject: [PATCH] [FIX]report_sxw : fix strip_name function that cut a name to a given length in a report. It no longer crash when no name is given to the function. bzr revid: csn@openerp.com-20130208135704-4jvc9odchlulefx6 --- openerp/report/report_sxw.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openerp/report/report_sxw.py b/openerp/report/report_sxw.py index b1f1e3d5891..325690205ef 100644 --- a/openerp/report/report_sxw.py +++ b/openerp/report/report_sxw.py @@ -189,6 +189,8 @@ class rml_parse(object): return newtag, attrs def _ellipsis(self, char, size=100, truncation_str='...'): + if not char: + return '' if len(char) <= size: return char return char[:size-len(truncation_str)] + truncation_str