From f6863b95634a46bdf6798eb4f9863f8b3aec5a33 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Wed, 25 Oct 2017 08:07:00 +0200 Subject: [PATCH] [FIX] don't pass an empty string for required char fields --- base_import_odoo/models/import_odoo_database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base_import_odoo/models/import_odoo_database.py b/base_import_odoo/models/import_odoo_database.py index 6d78f80ca..f8e750a62 100644 --- a/base_import_odoo/models/import_odoo_database.py +++ b/base_import_odoo/models/import_odoo_database.py @@ -398,11 +398,11 @@ class ImportOdooDatabase(models.Model): defaults = model.default_get(required) values = {'id': record['id']} for name, field in model._fields.items(): - if name not in required or name in defaults: + if name not in required or defaults.get(name): continue value = None if field.type in ['char', 'text', 'html']: - value = '' + value = '/' elif field.type in ['boolean']: value = False elif field.type in ['integer', 'float']: