summaryrefslogtreecommitdiff
path: root/addons/base_import/models/base_import.py
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2017-09-05 14:18:05 +0200
committerNicolas Martinelli <nim@odoo.com>2017-09-05 16:37:48 +0200
commita4bcb66bfc9ebaf0582680bb7efa7ac541b76a5a (patch)
tree9b624e64442aaebc4c61447fbecfe5f50667ee7b /addons/base_import/models/base_import.py
parent80ca45b16119694203ea979bff4ba007984f4dd5 (diff)
[FIX] base_import: headerless import
- Import a CSV file without header - Untick the option 'The first row contains the label of the column' An error is reported. If no header, the method `_match_headers` should return consistent object types. opw-769117
Diffstat (limited to 'addons/base_import/models/base_import.py')
-rw-r--r--addons/base_import/models/base_import.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/base_import/models/base_import.py b/addons/base_import/models/base_import.py
index b9e22ad9925..552d62e978b 100644
--- a/addons/base_import/models/base_import.py
+++ b/addons/base_import/models/base_import.py
@@ -453,7 +453,7 @@ class Import(models.TransientModel):
:rtype: (None, None) | (list(str), dict(int: list(str)))
"""
if not options.get('headers'):
- return None, None
+ return [], {}
headers = next(rows)
return headers, {