Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
15429 Visualizzazioni

 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
Abbandona
Risposta migliore

Hi,

Try it like this, it normally works

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

Avatar
Abbandona
Autore

It works, thanks :)

Risposta migliore

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

Correct me,If I am wrong
 Thank you


Avatar
Abbandona
Risposta migliore

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
feb 18
3483
0
feb 18
3367
1
lug 25
1806
1
mag 25
1893
1
apr 25
2352