summaryrefslogtreecommitdiff
path: root/odoo/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'odoo/models.py')
-rw-r--r--odoo/models.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/odoo/models.py b/odoo/models.py
index dea095cd4c9..ec219398d78 100644
--- a/odoo/models.py
+++ b/odoo/models.py
@@ -689,22 +689,18 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
current[i] = ','.join(xml_ids) or False
continue
- # recursively export the fields that follow name
- fields2 = [(p[1:] if p and p[0] == name else []) for p in fields]
+ # recursively export the fields that follow name; use
+ # 'display_name' where no subfield is exported
+ fields2 = [(p[1:] or ['display_name'] if p and p[0] == name else [])
+ for p in fields]
lines2 = value._export_rows(fields2)
if lines2:
# merge first line with record's main line
for j, val in enumerate(lines2[0]):
if val or isinstance(val, bool):
current[j] = val
- # check value of current field
- 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)
- else:
- # append the other lines at the end
- lines += lines2[1:]
+ # append the other lines at the end
+ lines += lines2[1:]
else:
current[i] = False