summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/qweb.js
AgeCommit message (Collapse)Author
2016-07-06[FIX] web: qweb: correctly set `preprocess_node` on qweb engineSimon Lejeune
issue: xml template are not translated anymore rev d56b35e2 moved qweb code inside the `qweb.js` file and also changed the behavior with the introduction of a `QWeb` factory returning instances of qweb rendering engine. However, we have to set on the rendering engine instance a `preprocess_node` function that will translate the qweb templates. The solution for this issue (also introduced with rev d56b35e2) was to set this function on the prototype of the QWeb factory, and it was obviously not enough as it has to be attached to the rendering engine instance. In order to benefit from the fact that the `preprocess_node` function is attached to the prototype of the QWeb factory, we could attach it to the rendering engine instance with something like `qweb.preprocessed_node = this.preprocessed_node`, however i find that conceptually attaching a translate function to a factory does not make sense, si i simply made `preprocess_node` a free function and i set it on rendering engine instance.
2016-06-23[FIX] web, web_kanban: make qweb default dict configurableGéry Debongnie
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.
2016-06-17[REF] web: refactor and simplify web.coreGéry Debongnie
2016-06-17[REF] web, *: move QWeb odoo init to web.QWebGéry Debongnie
this js module centralizes all odoo initialization