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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
12月 24
|
4217 | ||
|
0
11月 24
|
1703 | ||
|
2
7月 24
|
3525 | ||
|
0
4月 24
|
2251 | ||
|
3
3月 24
|
2930 |
Hello,
You have try if else condition in qweb ?