diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-01-02 13:20:04 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-01-02 13:20:04 +0100 |
| commit | e336dc38ca4be16197fa24e03e37e9db5d94d322 (patch) | |
| tree | b935f1d4264f09764b14933e29821fee6a341d40 /addons/web_planner/static | |
| parent | 43487b73d6d66eb6ffb8993e6f9e739f2c0dd97e (diff) | |
| parent | 62aa3be24cdfebc2537c98e767fdb8dfe0abcf1d (diff) | |
[MERGE] forward port branch 9.0 up to 62aa3be24cd
Diffstat (limited to 'addons/web_planner/static')
| -rw-r--r-- | addons/web_planner/static/src/js/web_planner_common.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/addons/web_planner/static/src/js/web_planner_common.js b/addons/web_planner/static/src/js/web_planner_common.js index ad27739f2c5..1e230a4f830 100644 --- a/addons/web_planner/static/src/js/web_planner_common.js +++ b/addons/web_planner/static/src/js/web_planner_common.js @@ -66,10 +66,17 @@ var PlannerDialog = Widget.extend({ */ willStart: function() { var self = this; + var context = session.user_context; + // fallback context for frontend + if(_.isEmpty(context)) { + context = { + lang: (document.documentElement.getAttribute('lang')||'').replace('-', '_'), + }; + } var res = this._super.apply(this, arguments).then(function() { return (new Model('web.planner')).call('render', [self.planner.view_id[0], self.planner.planner_application], - {context: session.user_context}); + {context: context}); }).then(function(template) { self.$res = $(template); }); |
