[FIX] Pagecount probelm while all objects print on same page and printing special character on xsl report

bzr revid: hda@tinyerp.com-20090827100454-ph1ffi4ulanykb7s
This commit is contained in:
NCH-OpenERP 2009-08-27 15:34:54 +05:30 committed by HDA (OpenERP)
parent 30b2fc5bd2
commit 20a0acd6cf
2 changed files with 6 additions and 6 deletions

View File

@ -765,12 +765,12 @@ class _rml_template(object):
r = _rml_flowable(self.doc,self.localcontext, images=self.images, path=self.path, title=self.title)
story_cnt = 0
for node_story in node_stories:
if story_cnt > 0:
fis.append(platypus.PageBreak())
fis += r.render(node_story)
if self.localcontext:
story_cnt += 1
if story_cnt == len(self.localcontext['objects']):
fis.append(PageCount())
fis.append(platypus.PageBreak())
story_cnt += 1
if self.localcontext:
fis.append(PageCount())
self.doc_tmpl.build(fis)
def parseNode(rml, localcontext = {},fout=None, images={}, path='.',title=None):

View File

@ -97,7 +97,7 @@ def _child_get(node, self=None, tagname=None):
def _process_text(self, txt):
if not self.localcontext:
return txt
return str2xml(txt)
if not txt:
return ''
result = ''