This question has been flagged
1 Reply
8534 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.

Avatar
Discard

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

Best Answer

Try this:

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

Avatar
Discard

Accepted this for you. Great answer!

It does not work in my invoice report. I want to short the Units showed under Quantity in the invoice body (in Spanish and German too long) .
<td class="text-right; text-nowrap " >
<span t-field="line.quantity"/>
<span t-field="line.product_uom_id" groups="uom.group_uom" >
</td>
This is the code. I tried in many different ways but nothing short the UoM from "Unidades" (Units) to "Unid" or better "Unid."
Can you help me?