Skip to Content
Menú
This question has been flagged
3 Respostes
15786 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
3742
0
de febr. 18
3684
1
de jul. 25
2468
1
de maig 25
2949
1
d’abr. 25
2896