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

I have this in my qweb report

 <span t-esc="formatLang(get_routing_data(o)[-1]['total'] , digits=3)"/>

it works ok, but sometimes it returns an empty list and then i get error index tuple out of range. how can i avoid it?

الصورة الرمزية
إهمال

Hello,

You have try if else condition in qweb ?

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
ديسمبر 24
4377
0
نوفمبر 24
1796
2
يوليو 24
3647
0
أبريل 24
2344
3
مارس 24
3356