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!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
1
груд. 24
|
4179 | ||
|
0
лист. 24
|
1692 | ||
|
2
лип. 24
|
3500 | ||
|
0
квіт. 24
|
2230 | ||
|
3
бер. 24
|
2665 |
Hello,
You have try if else condition in qweb ?