تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
15407 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

Try it like this, it normally works

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

الصورة الرمزية
إهمال
الكاتب

It works, thanks :)

أفضل إجابة

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

Correct me,If I am wrong
 Thank you


الصورة الرمزية
إهمال
أفضل إجابة

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
فبراير 18
3455
0
فبراير 18
3355
1
يوليو 25
1764
1
مايو 25
1832
1
أبريل 25
2329