QWeb is the template engine used by the OpenERP Web Client. It is an XML-based templating language, similar to Genshi, Thymeleaf or Facelets with a few peculiarities:
It's implemented fully in javascript and rendered in the browser.
Each template file (XML files) contains multiple templates, where template engine usually have a 1:1 mapping between template files and templates.
It has special support in OpenERP Web's Widget, though it can be used outside of OpenERP Web (and it's possible to use Widget without relying on the QWeb integration).
The rationale behind using QWeb instead of a more popular template syntax is that its extension mechanism is very similar to the openerp view inheritance mechanism. Like openerp views a QWeb template is an xml tree and therefore xpath or dom manipulations are easy to performs on it.
Creating First Hello World using qweb
There are only two steps to create a custom web ui using qweb
create the openerp view in xml
create the js file that will print the html hello world on start
Introduction
QWeb is the template engine used by the OpenERP Web Client. It is an XML-based templating language, similar to Genshi, Thymeleaf or Facelets with a few peculiarities:
- It's implemented fully in javascript and rendered in the browser.
- Each template file (XML files) contains multiple templates, where template engine usually have a 1:1 mapping between template files and templates.
- It has special support in OpenERP Web's Widget, though it can be used outside of OpenERP Web (and it's possible to use Widget without relying on the QWeb integration).
The rationale behind using QWeb instead of a more popular template syntax is that its extension mechanism is very similar to the openerp view inheritance mechanism. Like openerp views a QWeb template is an xml tree and therefore xpath or dom manipulations are easy to performs on it.Creating First Hello World using qweb
There are only two steps to create a custom web ui using qweb
myweb_view.xml
Create simple javascript