Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
51860 Zobrazení

Hello Friends,

Can anyone know how to cut down 2 digits after decimal,there actually in default displayed 4 digits in Qweb report.

For example:

if value is 123.4556 it will be cut down as 123.46

if value is 1456.0000 then it should displayed as 1456.00

Please help me to resolve this situation.Thanks in advance

Avatar
Zrušit

Thanks so much for help.

Nejlepší odpověď

Hello,

I Think it's helpful for you. 

<span t-esc="'%.2f'% l.product_uom_qty"/>

Thanks.

Avatar
Zrušit
Nejlepší odpověď

Hello 

You can take reference of below code

<span t-esc="sum(docs.mapped('amount'))" t-options='{"widget": "float", "precision": 2}'/>
Best Thanks,
Ankit H Gandhi.
Avatar
Zrušit
Nejlepší odpověď

Hello, you can use formatLang like that:


<div class="number-report">

<span t-esc="formatLang(line.price_subtotal, digits=2)"/>

</div>

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
kvě 23
10533
1
led 19
9632
0
říj 17
3466
0
lis 16
2719
0
říj 16
4968