Skip to Content
Menu
This question has been flagged
1 Reply
1949 Views

I created a report using the blank template in v14 and am trying to add page numbers to the bottom.   I have tried entering in the following code into the basic layout template and the studio customization layout in my report and neither option is displaying the page numbers.  


<div t-if="report_type == 'pdf'" class="text-muted">

                    Page: <span class="page"/> / <span class="topage"/>

                </div>


Does anyone know of a way to add page numbers to the blank template in Odoo V14 reports.  

Avatar
Discard
Best Answer

Hi,
If you are calling web.basic_layout your template and the footer given as follows:

<template id="your_custom_template_id">
<t t-call="web.basic_layout">
<div class="page">
Your Custom Template here
</div
</t>
</template>

Footer:

<div t-attf-class="o_company_#{doc.company_id.id}_layout footer o_background_footer">
<div class="text-right">
<div t-field="doc.company_id.report_footer"/>
<div t-if="report_type == 'pdf'">
Page
<span class="page"/>
/
<span class="topage"/>
</div>
</div>
</div>

Regards

Avatar
Discard