Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3902 Vues

I am trying to hide the first two digits (country digits) of the vat field when I print a qweb report. Looking for the way to do it I have found this method:

t-esc="o.partner_id.vat[2:]"

But it's not working for me. I get an error:

QWebException: "vat[2:]" while evaluating


Maybe it's not the right way. Any solution is appreciated.



Avatar
Ignorer
Meilleure réponse

Your answer is partially correct.

You need to check whether vat is available for that partner before doing vat[2:]

    <h2 t-if="o.partner_id.vat">
      VAT: <span t-esc="o.partner_id.vat[2:]" />
</h2>

Avatar
Ignorer
Auteur

Thank you, t-if is needed to make it works.

Publications associées Réponses Vues Activité
1
juin 21
8098
2
oct. 22
6489
3
mars 21
43977
1
sept. 16
4081
0
déc. 15
4430