Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits:
b06fce52 by Cédric Krier at 2023-01-22T23:39:18+01:00
Use only 2 digits for module percentage
Closes #5838
- - - - -
1 changed file:
- trytond/trytond/ir/module.py
Changes:
=====================================
trytond/trytond/ir/module.py
=====================================
@@ -425,7 +425,7 @@
'Module Config Wizard Other'
__name__ = 'ir.module.config_wizard.other'
- percentage = fields.Float('Percentage', readonly=True)
+ percentage = fields.Float('Percentage', digits=(1, 2), readonly=True)
@staticmethod
def default_percentage():
@@ -435,7 +435,7 @@
('state', '=', 'done'),
], count=True)
all = Item.search([], count=True)
- return done / all
+ return round(done / all, 2)
class ModuleConfigWizardDone(ModelView):
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/b06fce524697dacf748bee11838e53244bfb759a
--
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/b06fce524697dacf748bee11838e53244bfb759a
You're receiving this email because of your account on foss.heptapod.net.