Ir al contenido
Menú
Se marcó esta pregunta
4 Respuestas
8177 Vistas
<span t-field="abs(line.final_balance)"/>
i Try this code but it's not run.
i want to show only positive value any solution please
Avatar
Descartar
Autor

<span t-field="Math.abs(line.final_balance)"/>

but it can't

Autor

Thanks Niyas Rafhy...

it's working fine i change ...

<span t-field="Math.abs(line.final_balance)"/>

to

<span t-esc="abs(line.final_balance)"/>

Mejor respuesta

Then try with Math.abs(value),

Normally abs works fine,

eg: <span t-esc="abs(value)" />

Avatar
Descartar

Thank you @ Niyas Raphy.

+1

Publicaciones relacionadas Respuestas Vistas Actividad
3
jun 20
9562
1
mar 25
1219
0
nov 24
1444
0
jun 24
1520
1
jun 24
1996