[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) <flvr@odoo.com>
This commit is contained in:
flvr-odoo
2024-02-16 13:51:53 +00:00
parent 022a8435de
commit f6212e4554
+1 -1
View File
@@ -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()