summaryrefslogtreecommitdiff
path: root/bin/report/render/rml2html/rml2html.py
diff options
context:
space:
mode:
authorhda (Tiny) <hda@tinyerp.com>2009-12-08 15:42:46 +0530
committerhda (Tiny) <hda@tinyerp.com>2009-12-08 15:42:46 +0530
commit24cd74becf6df66c71cdafc9f8a41ffdde903aec (patch)
treecf195d12fdbdbeadd6de930c93e54b01fa959a23 /bin/report/render/rml2html/rml2html.py
parenta481bfb190667cd2fcb6335adf533afe6e1c8e2d (diff)
parent474af4cd6e6f00759589c4bee9cebf9d7d26b0d8 (diff)
Merge
bzr revid: hda@tinyerp.com-20091208101246-5ave2zzgzsjqf0m8
Diffstat (limited to 'bin/report/render/rml2html/rml2html.py')
-rw-r--r--bin/report/render/rml2html/rml2html.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/report/render/rml2html/rml2html.py b/bin/report/render/rml2html/rml2html.py
index 8f0197b32df..a3a14fc8aee 100644
--- a/bin/report/render/rml2html/rml2html.py
+++ b/bin/report/render/rml2html/rml2html.py
@@ -104,12 +104,10 @@ class _flowable(object):
process(node,new_node)
if new_node.get('colWidths',False):
sizes = map(lambda x: utils.unit_get(x), new_node.get('colWidths').split(','))
- tr = etree.Element('tr')
+ tr = etree.SubElement(new_node, 'tr')
for s in sizes:
- td = etree.Element('td')
- td.set("width", str(s))
- tr.append(td)
- new_node.append(tr)
+ etree.SubElement(tr, 'td', width=str(s))
+
return etree.tostring(new_node)
def _tag_para(self, node):
@@ -298,7 +296,7 @@ class _rml_template(object):
posx = int(utils.unit_get(tmpl.get('x1')))
frames[(posy,posx,tmpl.get('id'))] = _rml_tmpl_frame(posx, utils.unit_get(tmpl.get('width')))
for tmpl in pt.findall('pageGraphics'):
- for n in tmpl.getchildren():
+ for n in tmpl:
if n.tag == 'image':
self.data = rc + utils._process_text(self, n.text)
if n.tag in self._tags: