diff options
| author | Martin Trigaux <mat@odoo.com> | 2014-10-21 10:54:23 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2014-10-21 15:36:01 +0200 |
| commit | 354b82bee050ed29dd96adad613cac79ca778104 (patch) | |
| tree | 816bf0988cd80b9187ddd12c008565cbb1bff8df /addons/web_graph/static/src/js/graph_widget.js | |
| parent | 78a29b3738c14ccc8b042de1d95f502e4bc282ef (diff) | |
[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
Diffstat (limited to 'addons/web_graph/static/src/js/graph_widget.js')
0 files changed, 0 insertions, 0 deletions
