The QWeb templating language
The QWeb parser looks for special directives in the templates and replaces them with dynamically generated HTML. These directives are XML element attributes, and can be used in any valid tag or element, such as <div>
, <span>
, or <field>
.
Sometimes we want to use a QWeb directive but don't want to place it in any of the XML elements in our template. For those cases, we have a <t>
special element that can have QWeb directives, such as a t-if
or a t-foreach
, but is silent and won't have any output on the final XML/HTML produced.
The QWeb directives will frequently make use of evaluated expressions to produce different results depending on the current record values. There are two different QWeb implementations: client-side JavaScript, and server-side Python.
The reports and website pages use the server-side Python implementation. On the other hand, kanban views use the client-side JavaScript implementation. This means that the QWeb expression...