summaryrefslogtreecommitdiff
path: root/bin/report/interface.py
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2008-04-21 13:04:49 +0000
committerFabien Pinckaers <fp@tinyerp.com>2008-04-21 13:04:49 +0000
commit4a567f3e7a8af4d28627308290bcd23fdb3a4c8c (patch)
tree671d9ce8fceec5f661485d52341acdced2eae098 /bin/report/interface.py
parent1e256fd373a318728c17bf2c292bfc9c8054d766 (diff)
Modifs for logo and multiple-header
bzr revid: fp@tinyerp.com-f40939b7bd24b27497ead8daa85335ef727cef47
Diffstat (limited to 'bin/report/interface.py')
-rw-r--r--bin/report/interface.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/report/interface.py b/bin/report/interface.py
index a876b27897c..7343320b7a4 100644
--- a/bin/report/interface.py
+++ b/bin/report/interface.py
@@ -104,7 +104,7 @@ class report_rml(report_int):
if not context:
context={}
doc = print_xml.document(cr, uid, datas, {})
- self.bin_datas = doc.bin_datas
+ self.bin_datas.update( doc.bin_datas or {})
doc.parse(self.tmpl, ids, self.table, context)
xml = doc.xml_get()
doc.close()
@@ -191,20 +191,25 @@ class report_rml(report_int):
result.freeDoc()
return xml
- def create_pdf(self, xml):
+ def create_pdf(self, xml, logo=None):
+ if logo:
+ self.bin_datas['logo'] = logo
+ else:
+ if 'logo' in self.bin_datas:
+ del self.bin_datas['logo']
obj = render.rml(xml, self.bin_datas, tools.config['root_path'])
obj.render()
return obj.get()
- def create_html(self, xml):
+ def create_html(self, xml, logo=None):
obj = render.rml2html(xml, self.bin_datas)
obj.render()
return obj.get()
- def create_raw(self, xml):
+ def create_raw(self, xml, logo=None):
return xml
- def create_sxw(self, path):
+ def create_sxw(self, path, logo=None):
return path
from report_sxw import report_sxw