From 68f9f99ed3b8434f7ba621479bce215dce05bdc2 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 23 Feb 2016 10:52:55 +0100 Subject: [PATCH] [FIX] models: export of booleans In the case of a `raw_data` export, a boolean which has the value `False` will not be exported correctly. The fix handles the `False` value as a valid value for a field. opw-666142 --- openerp/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/models.py b/openerp/models.py index 390941db954..cc0a4979bef 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -907,10 +907,10 @@ class BaseModel(object): if lines2: # merge first line with record's main line for j, val in enumerate(lines2[0]): - if val: + if val or isinstance(val, bool): current[j] = val # check value of current field - if not current[i]: + if not current[i] and not isinstance(current[i], bool): # assign xml_ids, and forget about remaining lines xml_ids = [item[1] for item in value.name_get()] current[i] = ','.join(xml_ids)