'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

progress = fields.Float(string='Progress')
maximum_rate = fields.Float(string='Maximum Rate', default=1)

XML

<field name="maximum_rate" invisible="1"/>
<field name="progress" widget="progressbar" options="{'max_value': 'maximum_rate', 'editable': True}"/>

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%?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source