Skip to content
Snippets Groups Projects
Commit f825b604 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[FIX] rml: avoid reports ending by zero (opw 608073)

Commit b6a7402f (reverted at f8671cb4) was almost correct, the PageReset should be added at the end of each stories but only if we have one more stories.
The PageReset will force the page count to be reseted at zero which means that last page of report would have been at zero.
parent 020f23a9
No related branches found
No related tags found
No related merge requests found
......@@ -999,10 +999,10 @@ class _rml_template(object):
story_cnt = 0
for node_story in node_stories:
if story_cnt > 0:
# Reset Page Number with new story tag
fis.append(PageReset())
fis.append(platypus.PageBreak())
fis += r.render(node_story)
# Reset Page Number with new story tag
fis.append(PageReset())
story_cnt += 1
try:
if self.localcontext and self.localcontext.get('internal_header',False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment