Sometimes, we may want to use a QWeb directive but we don't want to place it in any of the XML elements in our template.For those cases, we have a special element that can have QWeb directives, such as t-if or t-foreach, but is silent and won't have any output on the final XML/HTML produced.
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 , , or .
The reports and website pages use the server-side Python implementation of QWeb.
When displaying a Kanban view, the internal steps are roughly as follows: Get the XML for the templates to render.1.
Call the server read() method to get the data for the fields mentioned in the2.
Locate the kanban-box template and parse it using QWeb to output the final3.
Inject the HTML in the browser display (the DOM).4.
This is not meant to be technically exact.It's just a mind map that can be useful to understand how things work in Kanban views.
Next, we'll learn about QWeb expression evaluation and explore the available QWeb directives, using examples that enhance the checkout Kanban card.