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?
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
दिस॰ 24
|
4230 | ||
|
0
नव॰ 24
|
1710 | ||
|
2
जुल॰ 24
|
3533 | ||
|
0
अप्रैल 24
|
2254 | ||
|
3
मार्च 24
|
2974 |
Hello,
You have try if else condition in qweb ?