O'Reilly logo

Odoo Development Essentials by Daniel Reis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding QWeb dynamic content

The QWeb parser looks for special attributes (directives) in the templates and replaces them with dynamically generated HTML.

For kanban views, the parsing is done by client-side JavaScript. This means that the expression evaluations done by QWeb should be written using the JavaScript syntax, not Python.

When displaying a kanban view, the internal steps are roughly as follows:

  • Get the XML for the templates to render.
  • Call the server read() method to get the data for the fields in the templates.
  • Locate the kanban-box template and parse it using QWeb to output the final HTML fragments.
  • Inject the HTML in the browser's display (the DOM).

This is not meant to be technically exact. It is just a mind map that can be useful to understand ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required