Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2668 Переглядів

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
жовт. 22
2240
1
жовт. 16
5446
1
лют. 24
12840
0
лист. 24
705
1
трав. 15
5543