diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-01-02 15:02:26 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-01-02 15:02:26 +0100 |
| commit | ddd293065eccd005327139c9963cf1cdf5ab3cde (patch) | |
| tree | 83d390ee7de4ef290726661f51662328ada10a15 /addons/web_planner/static | |
| parent | 3415a8712f262035945c9a4c0ad135d0b0cde856 (diff) | |
| parent | ba2a83ddfac149715846113b07d361fa2c63a7f5 (diff) | |
[MERGE] forward port branch saas-14 up to ba2a83ddfac
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 872745aad89..dc7914fc798 100644 --- a/addons/web_planner/static/src/js/web_planner_common.js +++ b/addons/web_planner/static/src/js/web_planner_common.js @@ -67,11 +67,18 @@ var PlannerDialog = Dialog.extend({ * Fetch the planner's rendered template */ willStart: function() { + var context = session.user_context; + // fallback context for frontend + if(_.isEmpty(context)) { + context = { + lang: (document.documentElement.getAttribute('lang')||'').replace('-', '_'), + }; + } var def = (new Model('web.planner')).call('render', [ this.planner.view_id[0], this.planner.planner_application ], { - context: session.user_context + context: context }).then((function (template) { this.$template = $(template); }).bind(this)); |
