Odoo Help


How to remove decimal if the value is 0 ?

Ivan Wellistya
on 10/15/15, 5:10 AM 406 views


I want to ask.. How to remove decimal if the value is zero. Example 123,456,789.00 <--- how to remove 00 ?


Juan Muñoz
On 10/15/15, 10:30 AM

I think in python you can do something like:

if(num.find(".00")){      #maybe this find method don't works, so see below



Or directly, if you don't want do the condition:   int(num)


num=0.999 -> int(num) -> num=0

num=123.456 -> int (num) -> num=123

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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: 10/15/15, 5:10 AM
Seen: 406 times
Last updated: 10/15/15, 10:30 AM