Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
15367 Vues

 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
Ignorer
Meilleure réponse

Hi,

Try it like this, it normally works

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

Avatar
Ignorer
Auteur

It works, thanks :)

Meilleure réponse

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

Correct me,If I am wrong
 Thank you


Avatar
Ignorer
Meilleure réponse

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Avatar
Ignorer
Publications associées Réponses Vues Activité
1
févr. 18
3421
0
févr. 18
3311
1
juil. 25
1726
1
mai 25
1730
1
avr. 25
2293