コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3910 ビュー

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.



アバター
破棄
最善の回答

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>

アバター
破棄
著作者

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

関連投稿 返信 ビュー 活動
1
6月 21
8105
2
10月 22
6506
3
3月 21
43999
1
9月 16
4088
0
12月 15
4435