[IMP] web: boot: do not wait 5s to log module info

Since [1], the test suite waits for 5s to start running. It's
really annoying when you run the suite in your browser, to debug
a single test or a sub suite. Waiting for 5s to determine whether
all modules can be loaded or not is not necessary anymore since
all assets coming from the same bundle are loaded in a single
file, even in debug=assets. This is true under the assumption that
there's no js module in assets_common requiring a module in another
assets bundle, which seems reasonnable.

[1] 468eb84fb4

closes odoo/odoo#83805

Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit is contained in:
Aaron Bohy
2022-02-02 09:03:55 +00:00
parent 290b09fb11
commit f16278cd29
+8 -10
View File
@@ -362,16 +362,14 @@
// Automatically log errors detected when loading modules
window.addEventListener("load", function logWhenLoaded() {
setTimeout(function () {
var len = jobPromises.length;
Promise.all(jobPromises).then(function () {
if (len === jobPromises.length) {
odoo.log();
} else {
logWhenLoaded();
}
});
}, 5000);
const len = jobPromises.length;
Promise.all(jobPromises).then(function () {
if (len === jobPromises.length) {
odoo.log();
} else {
logWhenLoaded();
}
});
});
/**