Skip to Content
Menu
This question has been flagged
3 Replies
15389 Rodiniai

 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'. 

Portretas
Atmesti
Best Answer

Hi,

Try it like this, it normally works

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

Portretas
Atmesti
Autorius

It works, thanks :)

Best Answer

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

Correct me,If I am wrong
 Thank you


Portretas
Atmesti
Best Answer

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
vas. 18
3435
0
vas. 18
3331
1
liep. 25
1735
1
geg. 25
1746
1
bal. 25
2300