Skip to content
Advertisement

How to make odoo progress bar use decimal?

So I am learning odoo right now, and I want to make the progress bar that use decimal to determine it’s percentage. so for example if I input a 0.5, the progress bar will show 50%, so I don’t have to input 50 to get 50%. I tried using options like below

PY

JavaScript

XML

JavaScript

but the output is either 0/1 or 1/1, it’s always on integer value, and it’s also not a percentage. so how do I make my progress bar show percentage using decimal value like 0.5 to show 50%?

Advertisement

Answer

If the max_value is different from 100, Odoo will compute the value using the following:

JavaScript

Unfortunately, you can’t change this behavior using widget options

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement