[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user