summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authordsh (Open ERP) <dsh@tinyerp.com>2009-06-01 12:51:49 +0530
committerdsh (Open ERP) <dsh@tinyerp.com>2009-06-01 12:51:49 +0530
commit74b2bb3e40beffef00a91a99e50b1e3122d1f233 (patch)
treef9ef2a32274e00cc94df01884b987a2ad817dbf8 /bin
parent8801abec64ee75c08a758ee2d5ae91f0c955e610 (diff)
bug fix for image size in htmland modifyreport
bzr revid: dsh@tinyerp.com-20090601072149-xpjplc49k7jrnaz3
Diffstat (limited to 'bin')
-rw-r--r--bin/report/render/html2html/html2html.py6
-rw-r--r--bin/report/report_sxw.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/bin/report/render/html2html/html2html.py b/bin/report/render/html2html/html2html.py
index fb1f6fcedd0..d4fa8559720 100644
--- a/bin/report/render/html2html/html2html.py
+++ b/bin/report/render/html2html/html2html.py
@@ -58,8 +58,10 @@ class html2html(object):
output = cStringIO.StringIO(base64.decodestring(src))
img = ImageReader(output)
(width,height) = img.getSize()
- new_child.set('width',str(width))
- new_child.set('height',str(height))
+ if not new_child.get('width'):
+ new_child.set('width',str(width))
+ if not new_child.get('height') :
+ new_child.set('height',str(height))
else :
new_child.getparent().remove(new_child)
new_child.text = utils._process_text(self, child.text)
diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py
index 22aa6e85f4b..fe003b4b23f 100644
--- a/bin/report/report_sxw.py
+++ b/bin/report/report_sxw.py
@@ -196,7 +196,7 @@ class rml_parse(object):
def removeParentNode(self, tag=None):
raise Exception('Skip')
- def set_html_image(self,id,model=None,field=None):
+ def set_html_image(self,id,model=None,field=None,context=None):
if not id :
return ''
if not model: