[Fix] trml2pdf: set the Heading tag name

bzr revid: sbh@tinyerp.com-20100402084926-vys4yshlxk5yx42z
This commit is contained in:
sbh (Open ERP)
2010-04-02 14:19:26 +05:30
parent 68124ff51d
commit 9f0fdbdc52
+2 -2
View File
@@ -636,9 +636,9 @@ class _rml_flowable(object):
styles = reportlab.lib.styles.getSampleStyleSheet()
style = styles['Title']
return platypus.Paragraph(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str'})))
elif re.match('^h([1-9]+[0-9]*)$', (node.text or '')):
elif re.match('^h([1-9]+[0-9]*)$', (node.tag or '')):
styles = reportlab.lib.styles.getSampleStyleSheet()
style = styles['Heading'+str(node.get[1:])]
style = styles['Heading'+str(node.tag[1:])]
return platypus.Paragraph(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str'})))
elif node.tag=='image':
if not node.get('file'):