In Odoo, the External ID is mainly used for referencing records across different modules or between instances. It's not directly related to preventing duplicate products during import. However, to avoid creating duplicate products during import, you can use the Internal Reference field as a unique identifier.
Here's how you can export your product list with the Internal Reference field:
- Navigate to the Product listing in Odoo.
- Click on the "Export" button to export the product list.
- In the export wizard, select the fields you want to export, including the Internal Reference field.
- Export the data in a CSV or Excel file format.
Now, you have your product list exported with the Internal Reference field.
To configure the import to prevent creating duplicate Internal Reference IDs, you'll need to use a unique constraint on the Internal Reference field. Unfortunately, out-of-the-box, Odoo does not provide a direct option to enforce this constraint during the import process. However, you can achieve this through customization or by using a custom script to preprocess your data before import.
Here's an approach to enforce uniqueness during the import process:
- Before importing your price list, check the Internal Reference of each product in the price list against your existing product database.
- If a product with the same Internal Reference already exists, update the existing product with the new price information instead of creating a new product.
- If a product with a new Internal Reference is found, import it as a new product.
You can achieve this by writing a custom Python script that preprocesses your price list data before importing it into Odoo. This script would handle the logic to check for existing products and update them accordingly.
Additionally, you can explore Odoo's import options, such as the "Update existing records" option, which can update existing records based on a matching field. However, this option might not fully address your requirement since it updates records based on a specific field match, rather than enforcing uniqueness based on the Internal Reference field.
Customization or scripting may be necessary to achieve the exact behavior you're looking for. If you're not comfortable writing custom scripts, you might consider reaching out to an Odoo developer or consultant for assistance with this task.