diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-08-23 16:44:58 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-08-23 16:44:58 +0200 |
| commit | 30bd5ac0e904906d90f4767bbbf178bf940c0c66 (patch) | |
| tree | ea271d0f46ed35c8af460aa71890c1dce474d2a4 /addons/web_editor/static/src/js | |
| parent | 7f2bd086087f73878f62933ecd2e7c2bed32142e (diff) | |
| parent | aec6248bb379c1ece02f5d4f718566c770fc2c6f (diff) | |
[MERGE] forward port branch saas-16 up to aec6248bb37
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/ace.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/ace.js b/addons/web_editor/static/src/js/ace.js index b1b28d78e83..b7e2daf6ead 100644 --- a/addons/web_editor/static/src/js/ace.js +++ b/addons/web_editor/static/src/js/ace.js @@ -204,7 +204,15 @@ var ViewEditor = Widget.extend({ initType = "less"; } if (!this.options.doNotLoadViews) { - initResID = (typeof this.viewKey === "number" ? this.viewKey : _.findWhere(this.views, {xml_id: this.viewKey}).id); + if (typeof this.viewKey === "number") { + initResID = this.viewKey; + } else { + var view = _.findWhere(this.views, {xml_id: this.viewKey}); + if (!view) { + view = _.findWhere(this.views, {key: this.viewKey}); + } + initResID = view.id; + } initType = "xml"; } } |
