QWeb report templates
The reports will usually follow a basic skeleton, as shown in the following code. 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="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<!-- Report header content -->
<t t-foreach="docs" t-as="o">
<!-- Report row content -->
</t>
<!-- Report footer content -->
</div>
</t>
</t>
</template>The most important elements here are the t-call directives using standard report structures. The web.html_container template does the basic setup to support an HTML document. The web.external_layout template handles the report header and footer, using the corresponding setup from the appropriate company. As an alternative, we can use the web.internal_layout template instead...