In brief To avoid duplicates when importing into Odoo, choose a unique matching key (company number, VAT, email), normalise your data in your spreadsheet, then use the native merge or the Data Cleaning app before running the import. A clean file at the start guarantees a reliable reference database at the end.
When a capital letter is enough to create two customers
Your source file contains "DUPONT SAS" on line 12 and "Dupont SAS" on line 47. Odoo imports them as two separate contacts. The result: split orders, duplicate follow-ups and an unreadable history.
This is a common situation. It is best resolved before the import, not after. The six tips below will help you, in order.
Choose a matching key, then normalise
Start by identifying the column that serves as your reference. One key per record type:
- Company contacts: company registration number or VAT number.
- Individual contacts: email address.
- Products: internal reference.
Two rows with the same key? One is a duplicate, with no room for debate. Then clean the raw data before comparing. Here are three practical examples:
- Case: "DUPONT SAS" and "Dupont SAS" both become "dupont sas" for comparison purposes.
- Legal form: "S.A.S.", "SAS" and "Sas" are all standardised to "SAS".
- Phone number: "06 12 34 56 78", "0612345678" and "+33612345678" represent the same number once spaces and the country code are normalised.
Apply these transformations in a working column. Your original column remains untouched for the final import.
Deduplicate in your spreadsheet, then check Odoo
Odoo is not a file cleaning tool. Your spreadsheet is. Add a "normalised key" column, sort by it, then flag rows whose key appears more than once. Remove or merge the identified duplicates before saving your import file.
Your file is clean, but Odoo may already contain duplicate records created manually. The native merge is available in the Community edition:
- Open the contacts list.
- Select the records you want to merge.
- Run the "Merge" action.
- Choose "Merge Automatically" or "Merge with Manual Check" depending on the level of control you need.
- The "Deduplicate Contacts" action also lets you search for duplicates across the entire database.
Please note: if one of the records is linked to validated or reconciled accounting entries, Odoo may block the merge. In that case, reset the relevant entries to draft, make the correction, revalidate them and then run the merge again. The Auguria team is on hand to help if the volume of records makes the process complex.
Save time with Data Cleaning (Enterprise edition)
The Data Cleaning app, available in the Enterprise edition, centralises deduplication. In the "Deduplication" menu, configure rules on the fields of your choice, click "Deduplicate" and work through the suggestions record by record.
This option has been verified on Odoo 19 and Odoo 20. It is not essential: the native merge covers common cases. Think of it as an accelerator for large databases. See the Odoo 19 new features page to find out more about recent changes to the module.
Keep a record and prepare for what comes next
Every merge deletes a record. If you have connected third-party systems, old identifiers must remain traceable. Build a mapping file: old key value, new key value, merge date.
This file is also useful for external ID-based data recovery. The logic behind External IDs in Odoo is covered in a dedicated article on this blog: refer to it for the next steps in your migration. You will also find on the free audit page a starting point for assessing the quality of your data before any import project.
Ready to import without duplicates?
A normalised file, a chosen matching key and duplicates handled upfront: your import can then proceed without any unpleasant surprises. Request a free audit so the Auguria team can assess the quality of your data and suggest a tailored cleaning plan.
Frequently asked questions
Is it better to merge contacts before or after the import?
Before, where possible. Merging in Odoo after the import is feasible, but it takes more time: you have to find duplicates among both existing and newly imported records. Cleaning the source file before the import is the fastest approach.
What happens to the history of a merged record in Odoo?
Odoo attaches related records (orders, invoices, messages) to the record that is kept. The history is not lost; it is consolidated under a single contact. After the merge, check that the expected documents appear on the resulting record.
How should I handle two companies with the same name that are genuinely different?
Add a discriminating element to your matching key: company registration number, postcode or internal reference. Two companies can share the same name and still be different customers; a business key distinguishes them without ambiguity.
Can duplicate detection at the point of data entry be automated in Odoo?
Odoo 19 offers assisted address entry on the contact record, which reduces manually created duplicates. For systematic detection across an existing database, the Data Cleaning app (Enterprise edition) or the native merge remain the available tools.
What should I do if Odoo refuses to merge two contacts?
The block usually occurs when a contact is linked to validated or reconciled accounting entries. Reset those entries to draft, make the necessary correction, revalidate them and then run the merge again.