Uniqueness of products names

Registered by Fabien (Open ERP)

We should be able to check unicity of product names.

From the ERP point of view, the unicity of each record is guaranteed with the ID field. You have several cases where you can have different products with the same name.

The most frequent case is when you work with variants. The product is characterized by a name (t-shirt) and one or more variants (XL, Red). In that case, they share the same name (but the computed name (a concat of the name and variants) and code are different).

They are others cases when this can happen:
* You run a multi-company environment, where the different companies sells the same products, but manage their products independently,
* A product has been desactivated (not deleted). It's not visible in the system but you want to create another one visible with the same name,
* You import products from another software where you have several products with the same name.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

The product name isn't unique, this is a great feature ;)

If somebody wants an unique product name, he can create (or installed) a module which add this fonctionnality.

It's more easy to add an unique constraint otherwise remove it

Philu 2010-12-14
The product name should always be unique, because users don't read the product ID's, and ambiguity with product names is just a bug in their eyes.

Fabian wrote:
1. You run a multi-company environment, where the different companies sells the same products, but manage their products independently.
Agree, so you'd have a constraint based on company/product-name.
2. A product has been desactivated (not deleted). It's not visible in the system but you want to create another one visible with the same name.
Can make the uniqueness constraint based on these fields: company/active/product-name.
3. You import products from another software where you have several products with the same name.
I don't think the business rules should be broken for this reason.

So to summarise: the uniqueness constraint could be based on company/active/product-name.

Philu 2011-04-04
See also this Blueprint:
https://blueprints.launchpad.net/openerp-au/+spec/prevent-duplicate-records

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.