The QWeb JavaScript evaluation context

Many of the QWeb directives use expressions that are evaluated to produce some result. When used from the client side, as is the case for Kanban views, these expressions are written in JavaScript. They are evaluated in a context that has a few useful variables available.

A record object is available, representing the current record, with the fields requested from the server. The field values can be accessed using either the raw_value or the value attributes:

  • raw_value is the value returned by the read() server method, so it's more suitable for use in condition expressions.
  • value is formatted according to the user settings, and is meant to be used for display in the user interface. This is typically ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.