Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
51879 Vizualizări

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

Imagine profil
Abandonează

Thanks so much for help.

Cel mai bun răspuns

Hello,

I Think it's helpful for you. 

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

Thanks.

Imagine profil
Abandonează
Cel mai bun răspuns

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.
Imagine profil
Abandonează
Cel mai bun răspuns

Hello, you can use formatLang like that:


<div class="number-report">

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

</div>

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
4
mai 23
10536
1
ian. 19
9634
0
oct. 17
3467
0
nov. 16
2725
0
oct. 16
4970