Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2641 Weergaven

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

Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
okt. 22
2227
1
okt. 16
5420
1
feb. 24
12820
0
nov. 24
690
1
mei 15
5528