From 7abaeecd2b815ff944df109fd1112697485d638d Mon Sep 17 00:00:00 2001 From: stw <> Date: Tue, 17 Jun 2008 08:03:43 +0000 Subject: [PATCH] bugfix with the logo's company bzr revid: stw-23722d6a682df1eecd8747be3188be0b82b9d4e2 --- bin/report/report_sxw.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 6a7fb96eef2..58078bde02b 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -202,6 +202,7 @@ class rml_parse(object): 'removeParentNode': self.removeParentNode, 'format': self.format, 'formatLang': self.formatLang, + 'logo' : user.company_id.logo, } self.localcontext.update(context) self.rml_header = user.company_id.rml_header @@ -439,6 +440,14 @@ class rml_parse(object): def _add_header(self, node): rml_head = self.rml_header + + # Refactor this patch, to use the minidom interface + if self.logo and (rml_head.find('company.logo')<0 or rml_head.find('',''' [[company.logo]] ''') + if not self.logo and rml_head.find('company.logo')>=0: + rml_head = rml_head.replace('','') + head_dom = xml.dom.minidom.parseString(rml_head) #for frame in head_dom.getElementsByTagName('frame'): # frame.parentNode.removeChild(frame)