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

Commit b6a7402 (reverted at f8671cb) 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.
This commit is contained in:
Martin Trigaux 2014-07-01 11:29:22 +02:00
parent 020f23a9d3
commit f825b6043b
1 changed files with 2 additions and 2 deletions

View File

@ -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):