İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
15399 Görünümler

 I would like to use t-if condition to check whether a field name (Ex.: 'Total Value') contains a string '**Total**'. I tried using:

t-if = 'Total' in a.name but it seems to check whether a.name is equal to 'Total'. 

Avatar
Vazgeç
En İyi Yanıt

Hi,

Try it like this, it normally works

<t t-if="'Total' in a.name">

Avatar
Vazgeç
Üretici

It works, thanks :)

En İyi Yanıt

<t t-if="'Total' in a.name">

Correct me,If I am wrong
 Thank you


Avatar
Vazgeç
En İyi Yanıt

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Şub 18
3454
0
Şub 18
3348
1
Tem 25
1759
1
May 25
1781
1
Nis 25
2312