[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
This commit is contained in:
csn-openerp 2013-02-08 14:57:04 +01:00
parent 1f1d2a1cdf
commit 34a41139f0
1 changed files with 2 additions and 0 deletions

View File

@ -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