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

Trim fields in QWEB output

By
OdooFan
on 1/28/15, 4:53 AM 674 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!

OdooFan
on 1/28/15, 6:35 AM
1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 1/28/15, 6:27 AM

Try this:

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

Accepted this for you. Great answer!

Yenthe
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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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