Odoo Help

0

How to display 2 decimals for particular field in Qweb Report?

By
vadivel
on 4/27/16, 12:01 AM 1,780 views

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

4
Akash Balar
On 4/27/16, 1:26 AM

Hello,

I Think it's helpful for you. 

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

Thanks.

0
Anh Vu
On 4/27/16, 12:33 AM

Hello, you can use formatLang like that:


<div class="number-report">

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

</div>

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 4/27/16, 12:01 AM
Seen: 1780 times
Last updated: 4/27/16, 2:05 AM