跳至內容
選單
此問題已被標幟
4 回覆
8283 瀏覽次數
<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
頭像
捨棄
作者

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

but it can't

作者

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

最佳答案

Then try with Math.abs(value),

Normally abs works fine,

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

頭像
捨棄

Thank you @ Niyas Raphy.

+1

相關帖文 回覆 瀏覽次數 活動
3
6月 20
9677
1
3月 25
1382
0
11月 24
1571
0
6月 24
1610
1
6月 24
2129