summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/qweb.js
AgeCommit message (Collapse)Author
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm
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