Hi, thanks for the suggestion!
I tried wrapping my report in display: table; height: 100% with the invoice lines inside a table-row as you mentioned.
It works fine when the content fits in a single page — the table expands to the bottom and the footer stays fixed at the bottom.
But when I add more rows (e.g., range(35)), the table correctly flows to the next page, but on the last page the table doesn’t stretch down to fill the available vertical space above the footer.
Is there a way to make the last page’s body area also expand until the footer, even if the table breaks across multiple pages?
Thanks again for your help!
I'm attaching sample code and outputs below 👇
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Report Action -->
<record id="action_report_stretch_test" model="ir.actions.report">
<field name="name">Stretch Test Report</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">custom_sale.custom_sale_tax_report_test</field>
<field name="report_file">custom_sale.custom_sale_tax_report_test</field>
<field name="binding_model_id" ref="sale.model_sale_order" />
<field name="binding_type">report</field>
</record>
<!-- Report Template -->
<template id="custom_sale_tax_report_test">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<!-- Header (first page only) -->
<div class="header">
<div class="">
<div class="h2 text-center">
Header
</div>
</div>
</div>
<!-- Page container: behave like a table -->
<div style="display: table; width: 100%; height: 100%;">
<!-- Stretchy middle row -->
<div style="display: table-row; height: 100%;">
<div style="padding: 10px;">
<h3 style="margin-bottom: 10px;">Body Part </h3>
<table class="inv-tbl"
style="width:100%; border:1px solid #000; border-collapse: collapse;">
<thead>
<tr>
<th style="border:1px solid #000; padding:4px;">Sl No</th>
<th style="border:1px solid #000; padding:4px;">Description</th>
<th style="border:1px solid #000; padding:4px;">Value</th>
</tr>
</thead>
<tbody>
<t t-set="count" t-value="1" />
<t t-foreach="range(15)" t-as="i">
<tr>
<td style="border:1px solid #000; padding:4px;">
<t t-esc="i" />
</td>
<td style="border:1px solid #000; padding:4px;">Sample</td>
<td style="border:1px solid #000; padding:4px;">Value</td>
</tr>
</t>
</tbody>
</table>
</div>
</div>
<div class="bottom-box last-page" style="">
<table class="table table-striped inv-tbl"
style="width:100%; border:1px solid #000; border-collapse: collapse;">
<thead>
<tr>
<th colspan="2">Bank Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>Name</td>
<td>HDFC</td>
</tr>
<tr>
<td>ACC No.</td>
<td>--------</td>
</tr>
<tr>
<td>Branch</td>
<td>Kozhikode</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="footer o_standard_footer">
<div class="">
<div style="width: 100%; text-align:center; padding:10px; background:#eee;">
<span>Footer Part</span>
</div>
</div>
</div>
</t>
</t>
</template>
</odoo>
output

When the range is set to 35 : to observe the overflow output was like
