From 692293d31bf0ececc3aedab0a48c325e1fcd046f Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 26 Oct 2011 10:25:43 +0200 Subject: [PATCH] [IMP] Add underscore ( '_' ) lib in default rendering context of the qweb instance used in the webclient bzr revid: fme@openerp.com-20111026082543-xsnfh298e0wb0ccw --- addons/web/static/src/js/core.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 39a1ba7ef64..ab0247e81b4 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -1046,6 +1046,9 @@ openerp.web.TranslationDataBase = openerp.web.Class.extend(/** @lends openerp.we openerp.web._t = new openerp.web.TranslationDataBase().build_translation_function(); openerp.web.qweb = new QWeb2.Engine(); openerp.web.qweb.debug = (window.location.search.indexOf('?debug') !== -1); +openerp.web.qweb.default_dict = { + '_' : _ +} openerp.web.qweb.format_text_node = function(s) { // Note that 'this' is the Qweb Node of the text var translation = this.node.parentNode.attributes['t-translation'];