Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
51950 Weergaven

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
Annuleer

Thanks so much for help.

Beste antwoord

Hello,

I Think it's helpful for you. 

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

Thanks.

Avatar
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

Hello, you can use formatLang like that:


<div class="number-report">

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

</div>

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
4
mei 23
10599
1
jan. 19
9662
0
okt. 17
3500
0
nov. 16
2753
0
okt. 16
4995