diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-04-02 11:32:14 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-04-02 11:47:05 +0200 |
| commit | e8e3a4bedfa405ca88a6989ff61899bb178373cd (patch) | |
| tree | 0d5f77bc77b8b53e707426af467b05c84c7b977c /addons/web/static/src/js/boot.js | |
| parent | a681ac61c4d2b94ddf64584a14eebbb6ab0a0ae9 (diff) | |
[IMP] web: allow to start the functional modules even if other modules are wrong. Adds the list of missing modules in modules can not be started.
Diffstat (limited to 'addons/web/static/src/js/boot.js')
| -rw-r--r-- | addons/web/static/src/js/boot.js | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/addons/web/static/src/js/boot.js b/addons/web/static/src/js/boot.js index 28ed102005c..e3589adc563 100644 --- a/addons/web/static/src/js/boot.js +++ b/addons/web/static/src/js/boot.js @@ -103,7 +103,18 @@ odoo.__DEBUG__.web_client = services['web.web_client']; if (jobs.length) { - console.warn('Warning: not all jobs could be started.', jobs); + for (var k=0; k<jobs.length; k++) { + var deps = odoo.__DEBUG__.get_dependencies( jobs[k].name ); + for (var i=0; i<deps.length; i++) { + if (jobs[k].name !== deps[i] && !(deps[i] in services)) { + if (!jobs[k].missing) { + jobs[k].missing = []; + } + jobs[k].missing.push(deps[i]); + } + } + } + console.warn('Warning: some modules could not be started for missing dependencies.', jobs); } // _.each(factories, function (value, key) { // delete factories[key]; @@ -113,10 +124,10 @@ var job, require; while (jobs.length && (job = _.find(jobs, is_ready))) { require = make_require(job); - - services[job.name] = job.factory.call(null, require); - if (require.__require_calls !== job.deps.length) { - console.warn('Job ' + job.name + ' did not require all its dependencies'); + try { + services[job.name] = job.factory.call(null, require); + } catch (e) { + console.error("Error: at least one error are found in module '"+job.name+"'", e); } jobs.splice(jobs.indexOf(job), 1); } |
