summaryrefslogtreecommitdiff
path: root/bin/report/render/render.py
diff options
context:
space:
mode:
authornvi-openerp <nicolas.vanhoren@openerp.com>2010-12-08 11:52:49 +0100
committernvi-openerp <nicolas.vanhoren@openerp.com>2010-12-08 11:52:49 +0100
commit38569b7754bb2e1dc1b6e8d58df626ff0fafaedb (patch)
treee0ad1d56381f8f0e4d288c0f50407191ab8ac7a7 /bin/report/render/render.py
parent8cc1c1086d2243678e2fef9c1631758ac517d097 (diff)
parent00f2f6b97d71f43fe38c0ade7875864dd7ef564b (diff)
[merge]
bzr revid: nicolas.vanhoren@openerp.com-20101206091222-miwtrvjkfh8hy8ec bzr revid: nicolas.vanhoren@openerp.com-20101206174010-f819dzx7vyw2jntk bzr revid: nicolas.vanhoren@openerp.com-20101207132443-z0wabhbh0ruzwoo2 bzr revid: nicolas.vanhoren@openerp.com-20101208105249-qfjalxkboqpi9xr0
Diffstat (limited to 'bin/report/render/render.py')
-rw-r--r--bin/report/render/render.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/report/render/render.py b/bin/report/render/render.py
index 5252288d53d..0d00701ee54 100644
--- a/bin/report/render/render.py
+++ b/bin/report/render/render.py
@@ -36,9 +36,23 @@ import threading
# _render
#
class render(object):
- def __init__(self, bin_datas={}, path='.'):
+ """ Represents a report job being rendered.
+
+ @param bin_datas a dictionary of name:<binary content> of images etc.
+ @param path the path in which binary files can be discovered, useful
+ for components (images) of the report. It can be:
+ - a string, relative or absolute path to images
+ - a list, containing strings of paths.
+ If a string is absolute path, it will be opened as such, else
+ it will be passed to tools.file_open() which also considers zip
+ addons.
+ """
+ def __init__(self, bin_datas=None, path='.'):
self.done = False
- self.bin_datas = bin_datas
+ if bin_datas is None:
+ self.bin_datas = {}
+ else:
+ self.bin_datas = bin_datas
self.path = path
def _render(self):