Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
9983 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Autor

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>

Autor

but footer start from 42nd page

Autor

<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>

Autor

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?

Autor

nice, thank you!

Autor

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

Autor

although for some reason it worked, thanks!

what was the issue?

Autor

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

Publicaciones relacionadas Respuestas Vistas Actividad
1
may 16
4993
1
may 25
2979
0
ene 25
3825
4
jul 20
8363
1
dic 19
6415