| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 77 |
| Technical Name |
wimpy_product_duplicate_prevention |
| License | OPL-1 |
| Website | https://www.linkedin.com/in/wimpynf/ |
| Versions | 16.0 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 77 |
| Technical Name |
wimpy_product_duplicate_prevention |
| License | OPL-1 |
| Website | https://www.linkedin.com/in/wimpynf/ |
| Versions | 16.0 17.0 18.0 19.0 |
Product Duplicate Prevention
(Smart Validation System)
for Odoo 18 Community Edition & Enterprise On Premise
Two powerful modules in one package - Prevention + Checker tool for complete duplicate management.
Module 1: Product Duplicate Prevention (this module) - Prevents new duplicates from being created
Module 2: Product Duplicate Prevention Checker - Scans and cleans existing duplicates via Excel export
Automatically prevent duplicate product names in your Odoo inventory with intelligent, real-time validation. The module detects duplicates regardless of letter case or extra spaces, ensuring clean master data without disrupting your workflow.
Key Features
- Smart Name Normalization: Automatically cleans product names by trimming extra spaces and collapsing multiple spaces into one, keeping your product list clean and consistent.
- Case-Insensitive Duplicate Detection: Prevents creating products with the same name regardless of letter case or spacing differences (e.g., "USB Cable 2M" vs "usb cable 2m").
- Database-Level Protection: Enforces unique names at database level with SQL constraints, blocking duplicates even during mass import, CSV uploads, or external API integrations.
- User-Friendly Error Messages: When a duplicate is detected, users receive clear, actionable error messages showing exactly why the name was rejected and which product already uses that name.
- Python Validation Layer: Pre-save validation provides immediate feedback before database operations, improving user experience.
- Zero Configuration Required: Works automatically after installation with no setup needed. All validation happens behind the scenes on the standard product form.
- Performance Optimized: Uses indexed database fields for fast duplicate checking with minimal overhead.
🎁 Bundle Package: Two Modules Included
| Module | Purpose | When to Use |
|---|---|---|
|
1. Product Duplicate Prevention (Main Module) |
Prevention: Blocks creation of new duplicate products in real-time | Install AFTER cleaning existing duplicates |
|
2. Product Duplicate Prevention Checker (Bonus - Included FREE) |
Cleanup: Scans and exports existing duplicates for mass editing via Excel | Install FIRST to clean up existing duplicates |
- Install Checker module (included free)
- Scan and export existing duplicates to Excel
- Mass edit names and archive status in Excel
- Import back to Odoo
- Install Prevention module (this one)
- Enjoy duplicate-free product database forever!
How It Works
When you create or edit a product, the module automatically:
- Cleans the name: Removes leading/trailing spaces and collapses multiple spaces into one.
- Normalizes for comparison: Creates a lowercase, space-normalized version stored in a computed field.
- Validates before save: Python validation checks for duplicates and shows user-friendly errors.
- Enforces at database level: SQL constraint ensures no duplicates slip through any entry method.
- Blocks duplicates: Shows a clear error message if a duplicate is found, including the conflicting product's name and ID.
Example: Duplicate Prevention in Action
Scenario: You try to create a new product with these names:
" Wireless Mouse "(extra spaces)"wireless mouse"(different case, multiple spaces)"WIRELESS MOUSE"(uppercase)
Result: Only the first one will be created. The rest will be blocked with an error message like:
Product name must be unique.
Rules:
• Case-insensitive comparison
• Extra spaces are ignored
Name you entered: wireless mouse
Already used by: Wireless Mouse (ID: 12345)
🚀 Installation Guide
What's Included in Your Purchase
✔ Module 1: wimpy_product_duplicate_prevention (Prevention module)
✔ Module 2: wimpy_product_duplicate_prevention_checker (Checker tool - FREE bonus)
✔ Both modules work together for complete duplicate management
Installation Option 1: New/Clean Database (No Existing Duplicates)
- Download and extract both modules to your Odoo addons directory
- Restart Odoo server
- Update Apps List
- Install Product Duplicate Prevention directly
- Done! New duplicates are now blocked
Installation Option 2: Existing Database (Has Duplicates) - RECOMMENDED
Step-by-step:
- Download and extract both modules to addons directory
- Restart Odoo and update Apps List
- First: Install Product Duplicate Prevention Checker module (included free)
- Go to Inventory → Configuration → Check Product Duplicates
- Click "Scan Duplicates" to identify all duplicates
- Click "Export to Excel" to download duplicates
- Edit product names and archive status in Excel (instructions included in file)
- Import back to Odoo (Favorites → Import records)
- Verify zero duplicates (scan again)
- Then: Install Product Duplicate Prevention module
- Done! Database is clean and protected forever
The Checker module allows you to:
- ✔ Fix hundreds of duplicates in minutes via Excel (not hours of manual clicking)
- ✔ Rename and archive products in one import operation
- ✔ Preview all duplicates before making changes
- ✔ Ensure zero duplicates before enabling prevention
Much faster than fixing duplicates manually one by one!
🎁 Bonus Module: Product Duplicate Prevention Checker
Included FREE with your purchase! This powerful diagnostic tool helps you prepare your database for duplicate prevention.
Checker Module Features:
- ✔ Smart Scanning: Identifies all duplicates using same normalization logic as Prevention module
- ✔ Visual Wizard: Color-coded results (green = keep, yellow = review)
- ✔ Excel Export: One-click export to formatted Excel file
- ✔ Mass Editing: Edit hundreds of products in Excel instead of clicking one by one
- ✔ Archive Management: Rename and archive products in one import operation
- ✔ Step-by-Step Guide: Excel file includes detailed import instructions
- ✔ Safe Updates: Uses External ID to update existing products (never creates duplicates)
- ✔ Read-Only Scanning: You control all changes - no automatic modifications
Dual-Layer Protection (Prevention Module)
| Layer | Technology | Purpose |
|---|---|---|
| Layer 1: Python Validation | _check_duplicate_name() method |
Pre-save validation with user-friendly error messages |
| Layer 2: SQL Constraint | UNIQUE(name_normalized) |
Database-level enforcement for bulletproof protection |
Why two layers?
- Python validation: Catches duplicates early with detailed error messages before hitting the database
- SQL constraint: Safety net that ensures no duplicates can slip through imports, API calls, or direct database operations
Benefits for Your Business
- ✔ Cleaner Master Data: Eliminate duplicate products caused by typos, case differences, or inconsistent naming conventions.
- ✔ Better Inventory Management: Avoid confusion when searching for products in sales orders, purchase orders, or stock movements.
- ✔ Data Integrity: Database-level constraint ensures no duplicates slip through any data entry method (UI, CSV, XML-RPC, REST API).
- ✔ User-Friendly: Clear error messages help users understand why their product name was rejected and how to fix it.
- ✔ Works Everywhere: Validates on all entry methods - UI forms, CSV import, external APIs, and custom scripts.
- ✔ Time Saver: Prevent duplicates at data entry + mass cleanup via Excel (Checker module).
- ✔ Zero Maintenance: Once installed, works automatically forever with no configuration needed.
- ✔ Performance Optimized: Indexed field ensures fast validation even with hundreds of thousands of products.
- ✔ Complete Solution: Prevention + Checker modules work together for end-to-end duplicate management.
Real-World Use Cases
Perfect for businesses that:
- Manage large product catalogs with multiple users entering data
- Import products from spreadsheets, e-commerce platforms, or external ERP systems
- Need to maintain clean inventory data for accurate reporting and analytics
- Want to prevent "near-duplicate" products (e.g., "Office Chair" vs "office chair" vs "OFFICE CHAIR")
- Require strict data quality standards for ERP/MRP operations
- Have multiple warehouses or locations with independent product creation
- Need to ensure product uniqueness before connecting to external systems (POS, eCommerce, BI tools)
- Experience issues with duplicate products from legacy data migrations or manual data entry
- Use automated product creation via APIs or integrations
- Have existing duplicates that need painless cleanup via Excel
Comparison: Before vs After
| Without Module | With Bundle (Prevention + Checker) |
|---|---|
|
❌ Allows duplicates: • "Laptop HP 15" • "laptop hp 15" • "LAPTOP HP 15" (3 products in database) |
✔ Complete protection: • "Laptop HP 15" (Only 1 product allowed) + Existing duplicates cleaned via Checker |
| ❌ Manual cleanup one by one (hours of work) | ✔ Mass cleanup via Excel export/import (minutes) |
| ❌ No tool to identify existing duplicates | ✔ Checker module scans and exports all duplicates |
| ❌ Duplicates can be created via import or API | ✔ Prevention module blocks all entry methods |
| ❌ Risk of selling/purchasing wrong product | ✔ Single source of truth + clean historical data |
Technical Details
Prevention Module (Main):
- Module Name: wimpy_product_duplicate_prevention
- Model: Inherits
product.template - New Field:
name_normalized(computed, stored, indexed, readonly) - Normalization Logic:
trim() + collapse_spaces() + lowercase() - Python Validation:
_check_duplicate_name()increate()andwrite()methods - SQL Constraint:
UNIQUE(name_normalized)on database table - Performance: Indexed field for O(log n) lookup speed - no performance impact
Checker Module (Bonus):
- Module Name: wimpy_product_duplicate_prevention_checker
- Model: TransientModel (wizard - no permanent tables)
- Export Format: Excel (.xlsx) with xlsxwriter library
- External ID Support: Creates/uses External IDs for safe import
- Archive Management: Supports Active field (TRUE/FALSE) for bulk archive
Both Modules:
- Compatible: Odoo 18.0 Community Edition & Enterprise Edition
- Dependencies: stock (Inventory module)
- No UI Changes: Work silently in the background without modifying standard views
Frequently Asked Questions
Q: Do I get both modules with one purchase?
A: Yes! You get both Prevention and Checker modules bundled together. One purchase, two powerful tools.
Q: Can I use the Checker module without the Prevention module?
A: Yes. The Checker module works independently and is useful for periodic duplicate audits. However, we recommend installing both for complete protection.
Q: Will this slow down my Odoo instance?
A: No. Both modules are performance-optimized. Prevention uses indexed fields for fast validation. Checker is read-only scanning with no runtime overhead.
Q: What happens during CSV import if duplicates are found?
A: The import will fail with a clear error message showing which product name is duplicated, allowing you to correct the CSV data before retrying.
Q: I have thousands of existing duplicates. Is cleanup painful?
A: Not at all! Use the included Checker module to export all duplicates to Excel, mass edit names/archive status, and import back. Fix thousands of products in minutes, not days.
Q: Does the Checker module require xlsxwriter?
A: Yes. Install with: pip3 install xlsxwriter (Required for Excel export functionality)
What Makes This Bundle Different?
| Feature | This Bundle | Other Solutions |
|---|---|---|
| Case-insensitive validation | ✔ Yes | ⚠ Some |
| Space normalization | ✔ Yes | ❌ Rare |
| Dual-layer protection (Python + SQL) | ✔ Yes | ⚠ Usually single layer |
| Cleanup tool included | ✔ FREE Checker module | ❌ Not included |
| Excel export for mass editing | ✔ Yes (Checker) | ❌ Manual cleanup only |
| Archive management | ✔ Via Excel import | ❌ Not supported |
Support & Updates
Version: 18.0.1.0.0 (Both modules)
Odoo Version: 18.0 (Community & Enterprise)
Prevention Module: wimpy_product_duplicate_prevention
Checker Module: wimpy_product_duplicate_prevention_checker
Author: Wimpy Nastian F.
Contact:
LinkedIn - Wimpy Nastian F.
For support, bug reports, or feature requests, please contact the author via wimpynastianfrayogha@gmail.com
Support includes:
- Installation and configuration assistance for both modules
- Bug fixes and patches
- Compatibility updates for future Odoo versions
- Feature enhancement considerations
- Integration support with other modules
- Excel import troubleshooting (Checker module)
License
Both modules are licensed under OPL-1 (Odoo Proprietary License).
Get Complete Duplicate Protection Today!
🎁 TWO Modules in ONE Package
Product Duplicate Prevention (Main Module)
+ Product Duplicate Prevention Checker (FREE Bonus)
✔ Real-time prevention ✔ Excel mass cleanup ✔ Archive management
✔ One-time purchase ✔ Lifetime updates for Odoo 18 ✔ Professional support
Trusted by businesses worldwide for maintaining clean product data
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module