Unlike Kanban views, the QWeb templates in reports are rendered on the server side and use a Python QWeb implementation. We can see this as two implementations of the same specification, and there are some differences that we need to be aware of.
To start with, QWeb expressions are evaluated using Python syntax, not JavaScript. For the simplest expressions, there may be little or no difference, but more complex operations will probably be different.
The context where expressions are evaluated is also different. For reports, we have the following variables available:
- docs is an iterable collection with the records to print
- doc_ids is a list of the IDs of the records to print
- doc_model identifies the model of the records, library.book for example
- time is a reference to Python's time library
- user is the record for the...