[IMP]:improved internal header for pagereset

bzr revid: apa@tinyerp.com-20100927112825-t8f7vkdut97fnfcv
This commit is contained in:
apa-tiny
2010-09-27 16:58:25 +05:30
parent 6860beac3e
commit a4f08919b1
+3 -3
View File
@@ -42,12 +42,11 @@ class PageCount(platypus.Flowable):
def draw(self):
self.canv.beginForm("pageCount")
self.canv.setFont("Helvetica", utils.unit_get(str(8)))
self.canv.drawString(0, 0, str(self.canv._pageCount))
self.canv.drawString(0, 0, str(self.canv.getPageNumber()))
self.canv.endForm()
class PageReset(platypus.Flowable):
def draw(self):
self.canv._pageCount = self.canv.getPageNumber()
self.canv._pageNumber = 0
class _rml_styles(object,):
@@ -811,7 +810,8 @@ class _rml_template(object):
fis.append(platypus.PageBreak())
fis += r.render(node_story)
# Reset Page Number with new story tag
fis.append(PageReset())
if self.localcontext.has_key('active_ids') and len(self.localcontext.get('active_ids')) > 1:
fis.append(PageReset())
story_cnt += 1
if self.localcontext:
fis.append(PageCount())