Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2599 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Okt 22
2215
1
Okt 16
5394
1
Feb 24
12773
0
Nov 24
684
1
Mei 15
5514