Skip to Content
Menu
This question has been flagged
4 Replies
8325 Rodiniai
<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
Portretas
Atmesti
Autorius

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

but it can't

Autorius

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)"/>

Best Answer

Then try with Math.abs(value),

Normally abs works fine,

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

Portretas
Atmesti

Thank you @ Niyas Raphy.

+1

Related Posts Replies Rodiniai Veikla
3
birž. 20
9748
1
kov. 25
1556
0
lapkr. 24
1643
0
birž. 24
1647
1
birž. 24
2178