From 25da7c43c01a3da8b10b606c8435e2c5327407c6 Mon Sep 17 00:00:00 2001 From: "Alexandre Fayolle @ camptocamp" Date: Tue, 7 Aug 2012 15:07:00 +0200 Subject: [PATCH] [MRG] from 6.1 (lp:c2c-addons/6.1 rev 28.3.27) --- .../base_external_referentials.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server_env_base_external_referentials/base_external_referentials.py b/server_env_base_external_referentials/base_external_referentials.py index 35745e915..091df55ee 100644 --- a/server_env_base_external_referentials/base_external_referentials.py +++ b/server_env_base_external_referentials/base_external_referentials.py @@ -21,6 +21,8 @@ from osv import fields, osv from server_environment import serv_config +import logging + class external_referential(osv.osv): @@ -32,8 +34,12 @@ class external_referential(osv.osv): values[referential.id] = {} for field_name in field_names: section_name = '.'.join((self._name.replace('.', '_'), referential.name)) - value = serv_config.get(section_name, field_name) - values[referential.id].update({field_name: value}) + try: + value = serv_config.get(section_name, field_name) + values[referential.id].update({field_name: value}) + except: + logger = logging.getLogger(__name__) + logger.exception('error trying to read field %s in section %s', field_name, section_name) return values _columns = {