Odoo Help


Is there a way to flag duplicate products?

Apex Motion Control, Inc.
on 8/7/14, 11:51 AM 2,789 views

I am looking to indicate when two products that have the same product Internal Reference number exist, the text in the product list changes to another color. This is hopefully the end goal.

I immagine there is a simple way of doing this with the view files (running on Saas version within a browser), but I am still new to editing code, and I still trying to figure out how it all works.

@ Ray & Ben. Yeah I don't know. In another question I posted I was told that text color can be edited based off of checks that are done by default. https://www.odoo.com/forum/help-1/question/how-does-one-change-the-default-text-color-that-openerp-uses-58724 In this case the product.product.tree was edited. In my goal, I imagine I would have to create an entirely different one, but have the same color edit and different check.

Apex Motion Control, Inc.
on 8/11/14, 11:56 AM

@ Med Said Bara. In the "Product Unique EAN or Reference Code (product_unique)" does the "default_code" refer to the Internal Reference Code? In this case this module would do exactly as I need?

Apex Motion Control, Inc.
on 8/11/14, 11:58 AM

Yes, "product code" referes to the internal code. Try also https://www.odoo.com/apps/7.0/product_unique_default_code/

Med Said BARA
on 8/11/14, 1:05 PM

@ Med Said Bara. Thanks for the reply. Also you wouldn't happen to know if these modules add to my module count, such that when I start a paid service my rates would increase?

Apex Motion Control, Inc.
on 8/11/14, 1:42 PM

Hard to say ! But let's say, more you give, more you get.

Med Said BARA
on 8/11/14, 3:31 PM



| 5 3 6
Cochin, India

Odoo Developer

On 8/12/14, 5:31 AM


It will be difficult to control with xml file. But we have different options to avoid duplicate products. Either you can give _sql_constarints for this field or you can override the create method and check whether any records existing with same internal reference.


Med Said BARA

--Med Said BARA--

| 5 5 7
--Med Said BARA--
Med Said BARA
On 8/8/14, 7:33 AM

Having products with the same internal code or the same product name is a nonsense.

This kind of practice should be avoided (banned).

This is also true for the  barcode identification field.

All, must be unique.

Just use: https://www.odoo.com/apps/7.0/product_unique/  and https://www.odoo.com/apps/7.0/product_name_unique_per_company/ to avoid this type of errors.




Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 8/7/14, 9:37 PM

XML view definitions are only 'aware' of the current record so I don't see how this is possible with XML.

So it is a good idea to make new custom field (boolean) to the target model, product.product. Then in the view you can define it (maybe as a checkbox).

Ben Bernard
on 8/8/14, 12:05 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 8/7/14, 11:51 AM
Seen: 2789 times
Last updated: 3/12/18, 4:12 AM