diff --git a/openerp/report/custom.py b/openerp/report/custom.py index 051d1f29862..d06f2d721f7 100644 --- a/openerp/report/custom.py +++ b/openerp/report/custom.py @@ -108,7 +108,7 @@ class report_custom(report_int): key = levels.keys() for l in key: objs = eval('obj.'+l,{'obj': obj}) - if not isinstance(objs, browse_record_list) and type(objs) <> type([]): + if not isinstance(objs, (browse_record_list, list)): objs = [objs] field_new = [] cond_new = [] diff --git a/openerp/report/render/rml2txt/utils.py b/openerp/report/render/rml2txt/utils.py index 122411afb2d..c08210ecc79 100644 --- a/openerp/report/render/rml2txt/utils.py +++ b/openerp/report/render/rml2txt/utils.py @@ -75,9 +75,9 @@ 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): + if isinstance(txt2, (int, float)): txt2 = str(txt2) - if type(txt2)==type('') or type(txt2)==type(u''): + if isinstance(txt2, basestring): result += txt2 return result