I need a different footer on the scond pdf page.
I added this to the footer template
document.getElementsByClassName('test').innerHTML="only on first page";
<t t-if="count() == 1">
only on first page
but this change the text test on all page.
The pdf file has two pages, but the python method count() only called ones.
PDF report uses header,page and footer css class for header/footer display. The following code will generate a 2 page pdf, with different header and footer. You can refer to get_pdf method in addons/report/models/report.py
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 10/23/14, 5:07 AM|
|Seen: 3211 times|
|Last updated: 6/24/16, 7:33 AM|