From fbbd4ac1095277497e698dfb4d807c10a31e080e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 22 Jan 2023 23:39:18 +0100 Subject: [PATCH] Use only 2 digits for module percentage Closes #5838 --- trytond/trytond/ir/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/trytond/ir/module.py b/trytond/trytond/ir/module.py index 394203cba4..7f18cbd2c8 100644 --- a/trytond/trytond/ir/module.py +++ b/trytond/trytond/ir/module.py @@ -425,7 +425,7 @@ class ModuleConfigWizardOther(ModelView): '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 @@ class ModuleConfigWizardOther(ModelView): ('state', '=', 'done'), ], count=True) all = Item.search([], count=True) - return done / all + return round(done / all, 2) class ModuleConfigWizardDone(ModelView):