From f6212e4554079daf10cc2c8bea06a824f005f576 Mon Sep 17 00:00:00 2001 From: flvr-odoo Date: Thu, 15 Feb 2024 11:21:37 +0100 Subject: [PATCH] [FIX] base : make the module list sorted Make the set() of module sorted, aka a list. We can be pretty sure that nobody relied on the order of this set before since it was completely underterministic. Therefor this change should not break anything and make the testing on runbot more consistant. This is mainly following the issue with the sql-injection testing failing randomly with the order of the modules. closes odoo/odoo#154324 X-original-commit: bbe33a1260ab3bfe97caa1197adbf00c661ddfb4 Signed-off-by: Vranckx Florian (flvr) --- odoo/modules/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/modules/module.py b/odoo/modules/module.py index 7281207531c..eac5b07a483 100644 --- a/odoo/modules/module.py +++ b/odoo/modules/module.py @@ -430,7 +430,7 @@ def get_modules(): _logger.warning("addons path does not exist: %s", ad) continue plist.extend(listdir(ad)) - return list(set(plist)) + return sorted(set(plist)) def get_modules_with_version(): modules = get_modules()