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

hi, I created a report and this report has about 50 pages, but footer starts only from a 42nd page, which problems it can be?

first page and last page have an individual page, empty header and empty footer, between them I created an empty header, page, which printing tables, and footer, where I try do page numbering but SUBJ

Avatar
Discard
Best Answer

Hello Mark,

Make sure you have perfectly structured format of report template?

See: https://www.odoo.com/documentation/12.0/reference/reports.html

You have to add 

- Html contrainer

- Internal/external layout

- Add page class in DIV

Hope it will helpful for you


Thanks and regards

Haresh Kansara

Avatar
Discard
Author

Hi Haresh, yep, I have all from this:

<template id="internal_layout">

<div class="header">

</div>

<t t-raw="0"/>

</template>

<template id="report_cash_journal">

<t t-call="report.html_container">

<t t-foreach="docs" t-as="o">

<t t-call="account_cash_report.internal_layout">

<div class="page">

some info

</div>

<div class="footer">

</div>

<div class="header">

</div>

<div class="page">

my tables

</div>

<div class="footer">

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

</div>

<div class="page">

some info

</div>

<div class="footer">

</div>

Author

but footer start from 42nd page

Author

<div class="footer">

<div class="row">

<div class="col-xs-2 pull-left">

<small>

<span>Page</span>

<span class="page" />

of

<span class="topage" />

</small>

</div>

</div>

</div>

its footer i used

Mark, you are following wrong guidelines, In every Qweb report you can only use one header/footer, if you use multiple header/footer then system confuse, where to add header/footer, So i suggest you to add your other code inside one page DIV, like some info, tables, etc. All content needs to set in page div

<template id="report_invoice">

<t t-call="web.html_container">

<t t-foreach="docs" t-as="o">

<t t-call="account_cash_report.internal_layout">

<div class="page">

some info

my tables

</div>

</t>

<div class="footer">

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

</div>

</t>

</t>

</template>

Author

thank you, Haresh, I will try to do this next morning, but I have another question, if I don't want print on first and last page footer(in this case I don't want page numbering), what I should do?

Author

nice, thank you!

Author

Hi Haresh, I tried to change the report in the way that you said, but the problem remained

Author

although for some reason it worked, thanks!

what was the issue?

Author

The first time I checked in the morning, I updated the xml file according to your recommendations, restarted the server and updated the module, the problem did not disappear (but I tried to add a couple of letters to check if the letters were updated, were), but the page where was opened the wizard I did not update. the second time in the evening

I decided to start the server again and make a hard refresh page, and this time a correct report was printed

Related Posts Replies Views Activity
1
May 16
3972
0
May 24
2654
1
Nov 22
1310
4
Jul 20
7225
1
Dec 19
5358