Odoo Help

Welcome!

This community 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.

0

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

By
herbert6453
on 2/13/14, 9:52 AM 1,035 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

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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