QWeb report templates
The reports will usually follow a basic skeleton, as shown in the following. This can be added to the reports/todo_report.xml
file, just after the <report>
element.
<template id="report_todo_task_template"> <t t-call="report.html_container"> <t t-call="report.external_layout"> <div class="page"> <!-- Report page content --> </div> </t> </t> </template>
The most important elements here are the t-call
directives using standard report structures. The report.html_container
template does the basic setup to support an HTML document. The report.external_layout
template handles the report header and footer, using the corresponding setup from the appropriate company. As an alternative, we can use report.internal_layout
template instead, ...
Get Odoo 10 Development Essentials 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.