[FIX] rml: avoid reports ending by zero (opw 608073)
Commitb6a7402
(reverted atf8671cb
) 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:
parent
020f23a9d3
commit
f825b6043b
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue