Skip to Content
मेन्यू
This question has been flagged
3 Replies
15375 Views

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

Hi,

Try it like this, it normally works

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

Avatar
Discard
Author

It works, thanks :)

Best Answer

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

Correct me,If I am wrong
 Thank you


Avatar
Discard
Best Answer

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Avatar
Discard
Related Posts Replies Views Activity
1
फ़र॰ 18
3426
0
फ़र॰ 18
3327
1
जुल॰ 25
1729
1
मई 25
1736
1
अप्रैल 25
2298