[IMP] web: prevent duplicate entries in QUnit dropdown search
It is really annoying to have thousands of duplicate entries in that dropdown menu. This commit hacks the problem away, but modifying QUnit in place. Some day, we should modernize our testing infrastructure, but this will do the trick in the mean time. closes odoo/odoo#105483 Signed-off-by: Georis François (fge) <fge@odoo.com>
This commit is contained in:
@@ -4903,9 +4903,11 @@
|
||||
var i,
|
||||
checked,
|
||||
html = "";
|
||||
|
||||
const names = new Set();
|
||||
for (i = 0; i < config.modules.length; i++) {
|
||||
if (config.modules[i].name !== "") {
|
||||
const name = config.modules[i].name;
|
||||
if (name !== "" && !names.has(name)) {
|
||||
names.add(name);
|
||||
checked = config.moduleId.indexOf(config.modules[i].moduleId) > -1;
|
||||
html += "<li><label class='clickable" + (checked ? " checked" : "") + "'><input type='checkbox' " + "value='" + config.modules[i].moduleId + "'" + (checked ? " checked='checked'" : "") + " />" + escapeText(config.modules[i].name) + "</label></li>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user