From 055ed990695adf887f9330ef031f096d1fc3be4f Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Mon, 23 Nov 2009 12:16:28 +0530 Subject: [PATCH] [FIX] orm: try..except block is buggy. dom is used in this block bzr revid: hmo@tinyerp.com-20091123064628-ovsu709rr8eh1xff --- bin/osv/orm.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 11c11abccac..226934da366 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1373,15 +1373,8 @@ class orm_template(object): result['name'] = 'default' result['field_parent'] = False result['view_id'] = 0 - - try: - doc = dom.minidom.parseString(encode(result['arch'])) - except Exception, ex: - logger = netsvc.Logger() - logger.notifyChannel('init', netsvc.LOG_DEBUG, 'Wrong arch in %s (%s):\n %s' % (result['name'], view_type, result['arch'] )) - raise except_orm('Error', - ('Invalid xml in view %s(%d) of %s: %s' % (result['name'], result['view_id'], self._name, str(ex)))) - xarch, xfields = self.__view_look_dom_arch(cr, user, doc, view_id, context=context) + + xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=context) result['arch'] = xarch result['fields'] = xfields