Odoo Help

0

How to remove decimal if the value is 0 ?

By
Ivan Wellistya
on 10/15/15, 5:10 AM 488 views

Hallo,

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

Thanks

0
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

int(num)

}


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

Examples:

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

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

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