Odoo Help


Trim fields in QWEB output

on 1/28/15, 4:53 AM 785 views

Can someone help me to print only a part of a field in a PDF? Example for an Invoice, tax line: "20% VAT - EU Sales" should turn into "20% VAT". Guess it should be possible by using some field attribute, like [[ format(t.name) [:7] ]] in Openerp 5 & 6 RML,  but I don't know how to do it in Odoo 8.

The only one I did not try....Thanks, works fine!

on 1/28/15, 6:35 AM


| 6 4 7
Lodz, Poland

On 1/28/15, 6:27 AM

Try this:

<span t-esc="t.name[:7]"/>

Accepted this for you. Great answer!

on 1/28/15, 6:38 AM

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

1 follower(s)


Asked: 1/28/15, 4:53 AM
Seen: 785 times
Last updated: 3/16/15, 8:10 AM