diff options
| author | Géry Debongnie <ged@odoo.com> | 2016-06-23 09:34:49 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2016-06-23 09:34:49 +0200 |
| commit | 11f88c8cd4be39e0b14cd3ecb872b498c8e79b00 (patch) | |
| tree | b3143929ff04f65d5122378530838ae51a3f75fd /addons/web/static/src/js | |
| parent | bb7f93381884f9c6e730d1a39a77415c2103879c (diff) | |
[FIX] web, web_kanban: make qweb default dict configurable
In a previous refactor, qweb configuration was simplified. However, I
missed the fact that session.js sneakily configure the qweb instance
after the fact. As a result, the kanban view did not have the _s key in
its custom qweb instance default dict. This commit allow the qweb class
constructor to add default keys to the instance.
Now, kanban view can add _s, and everything is good.
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/framework/qweb.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/framework/qweb.js b/addons/web/static/src/js/framework/qweb.js index 2202460a18a..39066216737 100644 --- a/addons/web/static/src/js/framework/qweb.js +++ b/addons/web/static/src/js/framework/qweb.js @@ -5,16 +5,16 @@ var translation = require('web.translation'); var _t = translation._t; -function QWeb(debug) { +function QWeb(debug, default_dict) { var qweb = new QWeb2.Engine(); - qweb.default_dict = { + qweb.default_dict = _.extend({}, default_dict || {}, { '_' : _, 'JSON': JSON, '_t' : translation._t, '__debug__': debug, 'moment': function(date) { return new moment(date); }, 'csrf_token': odoo.csrf_token, - }; + }); qweb.debug = debug; return qweb; } |
