Odoo Help


RML Report - How get Fontname from para style Element inside a parser method?

on 2/13/14, 9:52 AM 1,475 views

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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 2/13/14, 9:52 AM
Seen: 1475 times
Last updated: 3/16/15, 8:10 AM