Duplicate barcode (EAN)
Is any barcode (EAN) repeated on more than one product?
Verified Metric version 1.0.0
What it is
Barcodes that appear on more than one product, active or archived, of the company or with no company. The code is compared without spaces, dashes or leading zeros, because "0789..." and "789..." are the same to the scanner. Each row has the code, the products and the reason: both active in the same company, one of them archived, one from another company, or the same code written another way. The total is the number of repeated codes.
What it is not
- It does not check whether the code is a valid EAN (the check digit).
- It does not look at packaging or lot barcodes: only the product's.
- It does not say which product is right: it shows both for whoever knows the product to decide.
Pitfalls this metric handles
The traps a hasty calculation falls into — and how this metric avoids each one.
Forgotten archived product
- The mistake
- Looking only at active products.
- Why it happens
- Odoo lets an archived product keep the same code as an active one (from 16 on), and an import or integration may bring it back.
- How we handle it
- It reads archived products too; the row says which one is archived.
The same code written another way
- The mistake
- Comparing the code text as is.
- Why it happens
- "0789..." and "789..." pass Odoo's rule, but the scanner reads both as the same.
- How we handle it
- It compares without spaces, dashes or leading zeros.
Where the number comes from
Audit trail
- Odoo model
product.product- Fields
product.product.barcode,product.product.active,product.product.company_id,product.product.default_code- Why this path
- The barcode belongs to the product (the variant), the one the till and warehouse scanner looks for.
How you can adjust it
| Parameter | What it does | Options |
|---|---|---|
| Companies | company ids, always explicit | — |
| Items listed | how many rows to show on screen; the Excel file carries all | — |
Validation
To be validated on a real database. The method comes from a script that already ran in a customer's operation, and the calculation passes the automated tests against the demo database. IntData has not yet checked it on a real database; until then, check the first result in Odoo using the path in the audit trail.
- Date
- November 10, 2026
- Checked against
- Demo database, with synthetic repetitions of each reason. To be validated on a real database.
- Expected Odoo versions
14.0,15.0,16.0,17.0,18.0,19.0,20.0- Note
- The fields read exist from 14 to 19 and on master (the reference for 20), checked in the official code. Odoo's rule against repetition changes: in the database in 14 and 15, among active products in 16, among active products of the same company from 17 on. It does not use read_group.
Need a variation of this metric, or another one that does not exist yet?