← Back to team overview

credativ team mailing list archive

[Merge] lp:~credativ/openobject-server/fix-yaml-import into lp:openobject-server

 

Dmitrijs Ledkovs (credativ) has proposed merging lp:~credativ/openobject-server/fix-yaml-import into lp:openobject-server.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #873456 in OpenERP Server: "yaml_import cannot specify empty value"
  https://bugs.launchpad.net/openobject-server/+bug/873456

For more details, see:
https://code.launchpad.net/~credativ/openobject-server/fix-yaml-import/+merge/79375

When specifying python None value (which is serialised as null in yaml) openerp-server now imports it as empty id, in fields where relationship id is expected.

See bug report as well.
-- 
https://code.launchpad.net/~credativ/openobject-server/fix-yaml-import/+merge/79375
Your team Credativ is subscribed to branch lp:~credativ/openobject-server/fix-yaml-import.
=== modified file 'openerp/tools/yaml_import.py'
--- openerp/tools/yaml_import.py	2011-10-03 17:13:02 +0000
+++ openerp/tools/yaml_import.py	2011-10-14 08:31:20 +0000
@@ -164,6 +164,8 @@
             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):


Follow ups