After a bulk import of products, duplicates suddenly appear in Odoo: “M8 bolt galvanised” twice, each with its own stock, its own price history and its own vendor lines. Purchasing orders on one record, sales delivers from the other, and your stock figures no longer add up anywhere. How does this happen, and how do you fix it — without manually going through a thousand products?
Cause: no unique key
Odoo recognises “existing versus new” solely by an External ID or a match on Internal Reference. If your Excel file has neither, Odoo treats every imported record as new — even if a product with exactly the same name already exists. To Odoo, the product name is not a key, however unique it may look to you.
Fix vooraf: External ID toevoegen
Add an id column (External ID) to your import file with a stable format, for example import.product_SKU001. On every subsequent import, Odoo matches on that ID and updates the existing record instead of creating a second one. One extra column in Excel, and the duplicate problem is solved at the source.
Fix after the fact: finding and merging duplicates
If the damage is already in the database, proceed as follows:
- Open Purchase → Products (or Inventory → Products) in list view.
- Group by Internal Reference; groups with more than one line are suspect.
- Select the duplicates and choose Action → Merge. Odoo links all stock moves, orders and history to a single master product.
When merging, check which record has the correct cost price, VAT setting and routes — that one becomes the survivor. Start with a small group and check the result before working through the whole list.
Voorkomen: uniciteit afdwingen
If you want to lock this down structurally, you can go to Settings → Technical → Database Structure → SQL Constraints and have a unique constraint put on default_code. Odoo then refuses every new product with an SKU that already exists — on imports too, and also when an enthusiastic colleague manually creates a second record. Do have someone with technical knowledge set this up; a constraint on a polluted table will throw errors until the existing duplicates have been cleaned up.
Finally: a practical tip
Agree on one fixed SKU convention and make one person the owner of the product master data. By far most duplicates are not caused by technology but by three colleagues each importing their own Excel file. Is your database already full of duplicates, or do you want to set up your imports properly? Contact DAADit Group — we are happy to clean it up with you.
Questions about your Odoo implementation? Start the free Business Scan.
Start the Business Scan →After a bulk import of products, duplicates suddenly appear in Odoo: two records for “M8 bolt, galvanised”, each with its own stock, its own price history and its own vendor lines. Purchasing orders against one record, sales delivers from the other, and your stock figures no longer add up anywhere. How does this happen, and how do you fix it — without manually reviewing a thousand products?
Cause: no unique key
Odoo recognises “existing versus new” exclusively by an External ID or a match on Internal Reference. If your Excel has neither, Odoo treats every imported record as new — even if a product with exactly the same name already exists. To Odoo, the product name is not a key, however unique it may look to you.
Fix in advance: add an External ID
Add an id (External ID) column to your import file with a stable format, for example import.product_SKU001. On every subsequent import, Odoo matches on that ID and updates the existing record instead of creating a second one. One extra column in Excel, and the duplicates problem is solved at the source.
Fix afterwards: find and merge duplicates
If the damage is already in the database, work like this:
- Open Purchase → Products (or Inventory → Products) in list view.
- Group by Internal Reference; groups with more than one line are suspect.
- Select the duplicates and choose Action → Merge. Odoo links all stock moves, orders and history to a single master product.
When merging, check which record has the correct cost price, tax settings and routes — that one becomes the survivor. Start with a small group and verify the result before working through the whole list.
Prevention: enforce uniqueness
To close this off structurally, you can have a unique constraint set on default_code under Settings → Technical → Database Structure → SQL Constraints. Odoo will then reject any new product with an existing SKU — during imports, and also when an enthusiastic colleague manually creates a second record. Do have someone with technical knowledge set this up; a constraint on a polluted table produces errors until the existing duplicates are cleaned up.
Finally: a practical tip
Agree on one fixed SKU convention and make one person the owner of the product master data. By far most duplicates are not caused by technology, but by three colleagues each importing their own Excel. Is your database already full of doubles, or do you want your imports set up properly? Contact DAADit Group — we are happy to clean it up with you.
Questions about your Odoo implementation? Take the free Business Scan.
Start the Business Scan →