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

hi

How can I call a function (like jinja) on t-field in xml? Can I do it in t-value?
For example I got a data field and when I want to represent it, I want to make some changes on showing of it.
If I wanted to use jinja I wrote {{ date_field | my_filter_function }} but it doesn't work in odoo!
Thanks for helping

アバター
破棄
最善の回答

Hi, 

To evaluate a function through XML you have to use "t-esc" instead of t-field in odoo, you can refer to additional qweb operations in the following links:             

1) Basic Qweb Operations in Odoo             

 2) https://www.odoo.com/documentation/16.0/developer/reference/frontend/qweb.html

Hope it helps

アバター
破棄
関連投稿 返信 ビュー 活動
1
10月 22
2237
1
10月 16
5436
1
2月 24
12835
0
11月 24
704
1
5月 15
5539