odoo/openerp/report/render
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
..
html2html [REF] openerp.report: remove unused imports and vars, simplify logging. 2012-02-08 18:07:00 +01:00
makohtml2html [REF] openerp.report: remove unused imports and vars, simplify logging. 2012-02-08 18:07:00 +01:00
odt2odt [REF] openerp.report: remove unused imports and vars, simplify logging. 2012-02-08 18:07:00 +01:00
rml2html [IMP] use exact writing for fsf address 2013-05-14 16:32:54 +02:00
rml2pdf [FIX] report: page numbering rml reports 2014-10-21 15:36:01 +02:00
rml2txt [REM] unreachable code 2012-12-14 13:46:06 +01:00
__init__.py [IMP] openerp.report: _logger with fully qualified module name. 2012-01-24 13:55:12 +01:00
render.py [REF] openerp/report/render/render.py: removed silly main() method, rewrote french comment in english. 2011-05-31 17:27:11 +02:00
rml.py [IMP] openerp python module. 2011-02-07 13:57:23 +01:00
simple.py [REF] openerp.report: remove unused imports and vars, simplify logging. 2012-02-08 18:07:00 +01:00