跳至內容
選單
此問題已被標幟
1709 瀏覽次數

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
12月 24
4377
0
11月 24
1796
2
7月 24
3645
0
4月 24
2344
3
3月 24
3354