From 3d55aff1c83d3157228852d1fe28efe82d7cc329 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 3 Oct 2016 23:41:44 +0200 Subject: [PATCH] [FIX] convert: properly catch Value/Name Errors --- openerp/tools/convert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index da1db9bf4c0..a24f6640896 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -257,7 +257,7 @@ class xml_import(object): context.update(ctx_res) else: context = ctx_res - except ValueError, NameError: + except (ValueError, NameError): # Some contexts contain references that are only valid at runtime at # client-side, so in that case we keep the original context string # as it is. We also log it, just in case. @@ -446,7 +446,7 @@ form: module.record_id""" % (xml_id,) try: domain = safe_eval(domain, eval_context) - except NameError: + except (ValueError, NameError): # Some domains contain references that are only valid at runtime at # client-side, so in that case we keep the original domain string # as it is. We also log it, just in case.