From d0f70e9b29ee482c2ead91b04267c4c7e20afadd Mon Sep 17 00:00:00 2001 From: Dmitrijs Ledkovs Date: Thu, 13 Oct 2011 17:20:21 +0100 Subject: [PATCH] [IMP] allow to unset fields in yaml import lp bug: https://launchpad.net/bugs/873456 fixed bzr revid: dmitrijs.ledkovs@credativ.co.uk-20111013162021-225j5kl25bg9su3a --- openerp/tools/yaml_import.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openerp/tools/yaml_import.py b/openerp/tools/yaml_import.py index 91cdda1b896..0ec52a9bdf6 100644 --- a/openerp/tools/yaml_import.py +++ b/openerp/tools/yaml_import.py @@ -164,6 +164,8 @@ class YamlInterpreter(object): self.logger.log(logging.ERROR, 'id: %s is to long (max: 64)', id) def get_id(self, xml_id): + if xml_id == None: + return None if not xml_id: raise YamlImportException("The xml_id should be a non empty string.") if isinstance(xml_id, types.IntType):