Odoo Help

0

how to round 2 decimals, even if the value 00

By
henro
on 9/22/15, 10:28 PM 777 views

i to all,

how to round 2 decimals, even if the value are 00

example : 12.00 

can i do this on python

regards 

We can achieve using python using help of "%.2f" format specifier. Can you explain more your requirement ? where you want to put 2 decimal ? i.e. inside any report or inside any web form etc...

Emipro Technologies Pvt. Ltd.
on 9/23/15, 1:09 AM
3
Parikshit
On 9/23/15, 1:11 AM

Python only displays what's needed, so it displated 10.0

If it's the matter of printing it as 10.00.

To do that.

>>> d = 10
>>> print "Value: %.2f" % float(d)
Value: 10.00
>>>

Hope this will help you.

thanks Parikshit :)

henro
on 9/29/15, 9:36 PM

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: 9/22/15, 10:28 PM
Seen: 777 times
Last updated: 9/23/15, 1:11 AM