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?
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
1
jouluk. 24
|
4176 | ||
|
0
marrask. 24
|
1692 | ||
|
2
heinäk. 24
|
3498 | ||
|
0
huhtik. 24
|
2229 | ||
|
3
maalisk. 24
|
2641 |
Hello,
You have try if else condition in qweb ?