Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3880 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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

Related Posts Odpovědi Zobrazení Aktivita
1
čvn 21
8086
2
říj 22
6485
3
bře 21
43968
1
zář 16
4059
0
pro 15
4426