Skip to Content
Menu
This question has been flagged
1 Atsakyti
3908 Rodiniai

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.



Portretas
Atmesti
Best Answer

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>

Portretas
Atmesti
Autorius

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

Related Posts Replies Rodiniai Veikla
1
birž. 21
8100
2
spal. 22
6494
3
kov. 21
43985
1
rugs. 16
4084
0
gruod. 15
4430