[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:
committed by
Nicolas Martinelli
parent
102e838473
commit
fdf0f014bf
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user