Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
8520 Vizualizări

Hey i am making a custom report and because i needed an empty page so i used web.basic_layout and then i added my own header and all. But this basic_layout has left empty space on the top of my header and because of it my report is going at two pages. Can you tell me how to remove that extra spacing.

Following is just a chunk of code from my template to give an idea what i am doing. Kindly help. Thanks in advance.


<template id="new_report_nstp_template">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<div class="page" style="border-top: 5px solid green;border-bottom: 5px solid green;">
<div class="text-center" style="margin-top:-15%;z-index:999;">
<img src='/nstp_report/static/src/img/nstp.png' style="max-with: 100%;"/>
</div>
<br>
<br></br>
</br>
Imagine profil
Abandonează

Hi, If you have a paper-format for the report, try adjusting the top margin inside the paper-format, Thanks

Cel mai bun răspuns

you can specify the space by paper format(change the margin top and bottom)
this is an exemple : 

<record id="paperformat_payslip_group"
model="report.paperformat">
<field name="name">European A4</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">10</field>
<field name="margin_bottom">10</field>
<field name="margin_left">5</field>
<field name="margin_right">5</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">43</field>
<field name="dpi">90</field>
</record>
<report id="print_report"
string="Print Report" model="your.model_name"
report_type="qweb-pdf"
name="your_module.new_report_nstp_template"
file="your_module.new_report_nstp_template"
paperformat="paperformat_payslip_group""/>


Imagine profil
Abandonează
Autor

Thanks for replying. One question...

should i specify this margin in negative? as i want my image header to be at the very start of page

Autor

Worked for me! Thanks bro

Related Posts Răspunsuri Vizualizări Activitate
1
mar. 24
1640
1
sept. 22
3574
3
feb. 21
6411
0
feb. 17
2923
1
mar. 15
6005