Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1719 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ

Hello,

You have try if else condition in qweb ?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 24
4387
0
thg 11 24
1802
2
thg 7 24
3671
0
thg 4 24
2350
3
thg 3 24
3418