mirror of
https://github.com/c0de-archive/Odoo-Contact-Import.git
synced 2024-12-22 09:12:39 +00:00
Reverse name and ID in the search dictionary
when partner_ids = {rows[id]:rows[name] for rows in reader}, it will replace IDs with names When partner_ids = {rows[name]:rows[id] for rows in reader}, it will replace names with IDs
This commit is contained in:
parent
358a7d7da7
commit
1ecc1b50f6
2
main.py
2
main.py
@ -64,7 +64,7 @@ with open(config['partner_path'], 'r') as partner_csv:
|
|||||||
raise ValueError('Either id or name could not be indexed with find_index')
|
raise ValueError('Either id or name could not be indexed with find_index')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
partner_ids = {rows[id]:rows[name] for rows in reader} # Build a dict containing the company names as the keys and the __export__IDs as values
|
partner_ids = {rows[name]:rows[id] for rows in reader} # Build a dict containing the company names as the keys and the __export__IDs as values
|
||||||
reader = None
|
reader = None
|
||||||
|
|
||||||
# Open both the import_csv and temp_csv files
|
# Open both the import_csv and temp_csv files
|
||||||
|
Loading…
Reference in New Issue
Block a user