I want shorten text from field o.partner_id.name on a rml report. The output text should be max 40pt long. To calculate the text length i need the Fontname and Fontsize.
How can i get the style name or better direct the fontname and fontsize from the para tag in my rml parser method truncateString() without adding both as parameter to the parser method?
<para style="my_default_9">###[[truncateString(o.partner_id.name, 40)]]###</para>
I looking for an alternative to : <para style="my_default_9">###[[truncateString(o.partner_id.name, 40, "Arial", 8)]]###</para>
debug2 = self._node.__getattribute__('style')
self._node is NoneObject on my testsystem
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 2/13/14, 9:52 AM|
|Seen: 1035 times|
|Last updated: 3/16/15, 8:10 AM|