De-Duplication rules
Step 1: Activate the Developer Mode
To access the full functionality for creating rules, you often need to install Data Cleaning Module
Log in to your Odoo instance as an Administrator.
Go to the Data Cleaning
You will see a section titled "Configuration".
Step 2: Navigate to the De-Duplication Rules Menu
Under the section, click on "De-duplication Rules".
Alternatively, you can use the search bar at the top. Click the search bar and type "De-duplication Rules". Select it from the dropdown.
You will now see a list of existing de-duplication rules (if any).
Step 3: Create a New Rule
Click the New button to create a new rule.
Step 4: Configure the Rule Details
Fill in the form with the following information:
Rule Name: A clear, descriptive name for the rule (e.g., "Block Duplicate Contacts by Email", "Merge Leads by Phone Number").
Model: Select the Odoo model this rule will apply to. The most common choices are:
Contact (res.partner) - For Customers/Vendors.
Lead/Opportunity (crm.lead) - For CRM leads and opportunities.
Matching Method: This is the core of the rule. It defines how strict the comparison is.
Blocking: Choose this for an exact, strict match. If all selected fields match exactly, the duplicate is blocked.
Fuzzy: Choose this for a "similar" match (e.g., "Odoo" and "Odoo S.A."). This uses a similarity threshold and is more advanced.
Step 5: Define the Matching Conditions (Fields)
This section defines which fields to check for duplicates.
In the "Fields to match" section, click Add a line.
A new line will appear. Select a field from the dropdown (e.g., Email, Name, Phone, VAT [for Tax ID], Website, etc.).
You can add multiple fields. The rule will trigger if the values in ALL of the selected fields match an existing record.
Example 1: A rule with Email will block a record if the email already exists.
Example 2: A rule with Name and Phone will only block a record if both the full name and the phone number are identical to an existing contact.
Step 6: Set the Action and Behavior
Action on Duplicate: This defines what happens when a duplicate is found.
Block: Prevents the user from saving the duplicate record. A pop-up will warn them. This is the safest option.
Merge: Allows the user to merge the potential duplicate with the existing record. This is useful for Leads where information from different sources needs to be consolidated.
Step 7: Save and Activate the Rule
Once you have configured all the settings, click the Save button.
By default, the rule is saved as a draft. To enable it, you need to activate it.
Find the "Archived" checkbox (or a "Active" toggle switch). Uncheck "Archived" to make the rule active.
The rule is now live and will be enforced across your Odoo database.