From 056a492f9f724276e7ae3115a838fc5ab8dfdcfc Mon Sep 17 00:00:00 2001 From: Naresh Choksy Date: Mon, 4 May 2009 17:41:43 +0530 Subject: [PATCH 1/2] bugfix stocklocation report bzr revid: nch@tinyerp.com-20090504121143-mhdotlflvixcc93a --- bin/report/render/rml2pdf/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/report/render/rml2pdf/utils.py b/bin/report/render/rml2pdf/utils.py index c92567d738f..09f487318ee 100644 --- a/bin/report/render/rml2pdf/utils.py +++ b/bin/report/render/rml2pdf/utils.py @@ -91,6 +91,8 @@ def _process_text(self, txt): txt2 = eval(sps.pop(0),self.localcontext) except: txt2 = '' + if type(txt2) == type(0) or type(txt2) == type(0.0): + txt2 = str(txt2) if type(txt2)==type('') or type(txt2)==type(u''): result += txt2 return result From 044ac173b3f1c644d18a22fc9c1a9ec119797ac7 Mon Sep 17 00:00:00 2001 From: Naresh Choksy Date: Tue, 5 May 2009 11:56:48 +0530 Subject: [PATCH 2/2] bugfix:for none size bzr revid: nch@tinyerp.com-20090505062648-m1mie7p1tayn5adv --- bin/report/render/rml2pdf/utils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/report/render/rml2pdf/utils.py b/bin/report/render/rml2pdf/utils.py index 09f487318ee..2102912e974 100644 --- a/bin/report/render/rml2pdf/utils.py +++ b/bin/report/render/rml2pdf/utils.py @@ -112,10 +112,11 @@ units = [ def unit_get(size): global units - for unit in units: - res = unit[0].search(size, 0) - if res: - return unit[1]*float(res.group(1)) + if size: + for unit in units: + res = unit[0].search(size, 0) + if res: + return unit[1]*float(res.group(1)) return False def tuple_int_get(node, attr_name, default=None):