odoo/openerp/report/render/rml2pdf
Martin Trigaux 354b82bee0 [FIX] report: page numbering rml reports
Save the NumberedCanvas state before doing a page reset.
The order of execution when rendering an rml report is the following:
1. init canevas (_pageNumber = 1)
2. render the page element
3. if still pages to render, afterPage method
4. if still pages to render, showPage method (_pageNumber += 1)
5. back to step 2 for each page
6. draw the ResetPage element (setting flag _doPageReset=True)
7. end the document build with afterPage & showPage method

The PageReset element should be executed at the end of the rendering of a story (subdocument) to reinitialize the page numbers to 0 (for new story) and insert the pageCount element for that story with the total number of pages (needed if want to use tag <pageCount/> in rml).

In case of NumberedCanvas (e.g. used in Trial Balance report), the numbering is generated at the end of the build using the _saved_page_states dict in the canevas.
To have an accurate _saved_page_states content, it needs to be saved before the pageReset.

Fixes #2225
2014-10-21 15:36:01 +02:00
..
__init__.py [IMP] Added missing vim mode lines 2011-11-22 09:58:48 +01:00
color.py [REM] unnecessary parens 2012-12-14 13:38:03 +01:00
customfonts.py [FIX] rml2pdf: correct filename for Sun-ExtA font 2013-05-28 20:50:31 +02:00
trml2pdf.py [FIX] report: page numbering rml reports 2014-10-21 15:36:01 +02:00
utils.py [IMP] use exact writing for fsf address 2013-05-14 16:32:54 +02:00