diff options
| author | Martin Trigaux <mat@odoo.com> | 2018-12-20 14:29:37 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-01-04 10:16:06 +0000 |
| commit | e24ab17d38fb049404f04112990e8b2fe1dd7727 (patch) | |
| tree | fa2eb2f8dfc4e70c2f3740bbc26ab0eda47f1e34 /addons/web/static/src/js | |
| parent | 0ecaf53726f43d6e42842ecf34fc74d661bf1d21 (diff) | |
[FIX] web: do not open first app if no app
On an instance with only web installed.
A non-admin use had an error as trying to open the first app (which does not exists)
closes odoo/odoo#29687
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/chrome/apps_menu.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/chrome/apps_menu.js b/addons/web/static/src/js/chrome/apps_menu.js index f6535ed764c..eb7faaa971b 100644 --- a/addons/web/static/src/js/chrome/apps_menu.js +++ b/addons/web/static/src/js/chrome/apps_menu.js @@ -41,6 +41,9 @@ var AppsMenu = Widget.extend({ * Open the first app in the list of apps */ openFirstApp: function () { + if (!this._apps.length) { + return + } var firstApp = this._apps[0]; this._openApp(firstApp); }, |
