[FIX] web: avoid race condition in the website

Depending on the speed of the runbot, errors may appear if one tries to
use a template that is not yet loaded. Templates are being
loaded and we add new template to read, the ready function does not
take into account new additions.
This commit is contained in:
Christophe Matthieu
2017-12-19 13:35:36 +01:00
committed by Nicolas Martinelli
parent 102e838473
commit fdf0f014bf
+1 -1
View File
@@ -36,7 +36,7 @@ data.ready = function () {
if (!odoo._modules) {
all_ready.then(translations);
}
} else if(all_ready.state() === "resolved") { // can add async template
} else { // can add async template
all_ready = $.when(dom_ready, ajax.loadXML());
}
return all_ready;