Odoo Help

Welcome!

This community 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.

0

Is there a way to flag duplicate products?

By
Apex Motion Control, Inc.
on 8/7/14, 11:51 AM 1,397 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
4

Janeesh

--Janeesh--
1641
| 4 3 4
Cochin, India
--Janeesh--

Odoo Developer

Janeesh
On 8/12/14, 5:31 AM

Hi,

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.

3

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--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.

 

 

1

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

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. 

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 8/7/14, 11:51 AM
Seen: 1397 times
Last updated: 3/16/15, 8:10 AM