diff options
| author | Sbh (OpenERP) <sbh@tinyerp.com> | 2010-12-07 11:44:23 +0530 |
|---|---|---|
| committer | Sbh (OpenERP) <sbh@tinyerp.com> | 2010-12-07 11:44:23 +0530 |
| commit | 8ef3e4349de4dcd91bcb5a9c287ff8e502da27d7 (patch) | |
| tree | 7a0d4b06a2c2ea5cf4e39dad075f8c0567a2935a /bin/report/render/render.py | |
| parent | 0475e814dc9bbbe9dc1c81fdf4180c7d38e173e9 (diff) | |
| parent | 3bde229bc3214e07303b0af4b966349ed1d97465 (diff) | |
[MERGE] Merge with lp:openobject-server
bzr revid: sbh@tinyerp.com-20101207061423-j1nkihudn306h2gz
Diffstat (limited to 'bin/report/render/render.py')
| -rw-r--r-- | bin/report/render/render.py | 18 |
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): |
