[IMP] base_import: match column names withtout check the case
If you try to import a file with a header 'Parent_id/id' _match_header will not match Parent_id with parent_id because it was comparing with case sensitive. It's not a bug, but in most cases this new behaviour (non sensitive case search) is what the end user was expected. Hate Excel and the auto correct capitalization !
This commit is contained in:
parent
6ef068a811
commit
b9adcc7598
|
@ -157,7 +157,7 @@ class ir_import(orm.TransientModel):
|
|||
for field in fields:
|
||||
# FIXME: should match all translations & original
|
||||
# TODO: use string distance (levenshtein? hamming?)
|
||||
if header == field['name'] \
|
||||
if header.lower() == field['name'].lower() \
|
||||
or header.lower() == field['string'].lower():
|
||||
return [field]
|
||||
|
||||
|
|
Loading…
Reference in New Issue