summaryrefslogtreecommitdiff
path: root/odoo/models.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-11-30 18:43:08 +0100
committerChristophe Simonis <chs@odoo.com>2017-11-30 18:43:08 +0100
commit42264d8dcb7f8d0795c84718d1fc9a5fd1aefd32 (patch)
tree216ded7eac5ba06623892aaaece74c586afd4b5e /odoo/models.py
parente4a281b5a5f7ea44e4f25259b1a84cb0dc437ebc (diff)
parent5d7ad2b16cc3ef579a6657822b7c57b07fef4f52 (diff)
[MERGE] forward port branch saas-16 up to 5d7ad2b16cc
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