Odoo Help


how to round 2 decimals, even if the value 00

on 9/22/15, 10:28 PM 926 views

i to all,

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

example : 12.00 

can i do this on python


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

Parikshit Vaghasiya

--Parikshit Vaghasiya--
| 6 3 8
--Parikshit Vaghasiya--

Working as an OpenERP/Odoo developer both experience in web and addons. you can contact me at:

E-mail : parikshitvaghasiya@gmail.com

Blog : parikshitvaghasiya.blogspot.in

Stackoverflow : http://stackoverflow.com/users/5089106/parikshit-vaghasiya

Parikshit Vaghasiya
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 :)

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.


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)


Asked: 9/22/15, 10:28 PM
Seen: 926 times
Last updated: 9/23/15, 1:11 AM