Skip to Content
Menú
This question has been flagged
3 Respostes
15506 Vistes

 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
Descartar
Best Answer

Hi,

Try it like this, it normally works

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

Avatar
Descartar
Autor

It works, thanks :)

Best Answer

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

Correct me,If I am wrong
 Thank you


Avatar
Descartar
Best Answer

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de febr. 18
3529
0
de febr. 18
3460
1
de jul. 25
2004
1
de maig 25
2173
1
d’abr. 25
2513