Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029400Openbravo ERP01. General setuppublic2015-03-25 12:332015-05-08 14:13
VictorVillar 
vmromanos 
urgentmajoralways
closedfixed 
5
 
pi 
umartirena
Core
No
0029400: It is possible to add the same UPC for different products
It is possible to add the same UPC for different products
As group admin role,
 go to Product window,
   Create a new product and add the UPC: 123
   Create a new product and add the UPC: 123

Realise that is possible, and it should not.
No tags attached.
related to defect 0029495 closed Orekaria Retail Modules It is possible to add the same UPC for different products 
Issue History
2015-03-25 12:33VictorVillarNew Issue
2015-03-25 12:33VictorVillarAssigned To => migueldejuana
2015-03-25 12:33VictorVillarResolution time => 1429826400
2015-03-25 12:33VictorVillarTriggers an Emergency Pack => No
2015-03-25 12:34VictorVillarIssue Monitored: networkb
2015-04-01 14:11OrekariaAssigned Tomigueldejuana => Orekaria
2015-04-01 14:19OrekariaProjectRetail Modules => Openbravo ERP
2015-04-01 14:20OrekariaModules => Core
2015-04-01 14:20OrekariaAssigned ToOrekaria =>
2015-04-01 14:20OrekariaCategoryMulti UPC/EAN for Product => 01. General setup
2015-04-01 14:20OrekariaProposed Solution updated
2015-04-01 14:21OrekariaProposed Solution updated
2015-04-01 14:21OrekariaNote Added: 0076309
2015-04-01 16:23VictorVillarAssigned To => Sandrahuguet
2015-04-01 16:45VictorVillarSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8174#r8174
2015-04-01 16:46VictorVillarRelationship addedrelated to 0029495
2015-04-07 19:14AtulOpenbravoAssigned ToSandrahuguet => AtulOpenbravo
2015-04-07 19:14AtulOpenbravoStatusnew => scheduled
2015-04-30 11:27AtulOpenbravoNote Added: 0076906
2015-05-05 15:53umartirenaNote Edited: 0076906bug_revision_view_page.php?bugnote_id=0076906#r8439
2015-05-05 15:53umartirenaNote Edited: 0076906bug_revision_view_page.php?bugnote_id=0076906#r8440
2015-05-05 15:54umartirenaNote Edited: 0076906bug_revision_view_page.php?bugnote_id=0076906#r8441
2015-05-08 11:35vmromanosAssigned ToAtulOpenbravo => vmromanos
2015-05-08 11:43vmromanosNote Added: 0077226
2015-05-08 11:48vmromanosNote Added: 0077227
2015-05-08 11:54hgbotCheckin
2015-05-08 11:54hgbotNote Added: 0077228
2015-05-08 11:54hgbotStatusscheduled => resolved
2015-05-08 11:54hgbotResolutionopen => fixed
2015-05-08 11:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.module.unique.upc/rev/477a8767f7802391af8935c9cc6468d7913d5af0 [^]
2015-05-08 14:13umartirenaReview Assigned To => umartirena
2015-05-08 14:13umartirenaNote Added: 0077239
2015-05-08 14:13umartirenaStatusresolved => closed
2015-05-08 14:13umartirenaFixed in Version => pi

Notes
(0076309)
Orekaria   
2015-04-01 14:21   
CREATE UNIQUE INDEX m_product_ad_client_upc
   ON m_product (ad_client_id, upc)
   WHERE upc IS NOT NULL;
(0076906)
AtulOpenbravo   
2015-04-30 11:27   
(edited on: 2015-05-05 15:54)
Test Plan:

- Log in as F&B International Group Admin.
- Create a preference with Property "DoNotAllowDuplicateUpc" with value=Y visible for F&B España org.
- Logout and Login.
- Create a Product for F&B España org with Upc and save it.
- Create another product for F&B Region Norte org with same upc as above and save it.
- System will display a error "Upc already exists for other product within F&B España org and its child. Duplicate Upc for product within F&B España org or its child not allowed."
- Create another product for * org with same upc as above and save it.
- Product will be saved successfully.
- Create another product for F&B US Inc. org with same upc as above and save it.
- Product will be saved successfully.
- Delete preference with property "DoNotAllowDuplicateUpc".
- Logout and Login.
- Create another product F&B Region Sur with same upc as above and save it.
- Product will be saved successfully.

(0077226)
vmromanos   
2015-05-08 11:43   
We have decided to implement this restriction in an external module called Unique Product UPC per Organization Tree. This way we avoid any possible collateral issue in Core as a consequence of this new restriction.

The user will have the possibility to configure the organization where the unique UPC restriction is active. This restriction will affect to all its child organizations too.
(0077227)
vmromanos   
2015-05-08 11:48   
Test Plan:

1. Install the Unique Product UPC per Organization Tree module
2. Go to Organization window. Select FB España.
3. Go to Information tab. Set Unique UPC.. = Y
4. Go to product window. Create a new product for FB España. Save it. Verify no errors are raised
5. Create a new product for FB España, UPC= A. Save it. Verify no errors are raised
6. Create a new product for FB España, UPC= A. Save it. An error is raised
7. Change organization to Norte. Save it. An error is raised
8. Change organization to FB US. Save it. Verify no errors are raised
(0077228)
hgbot   
2015-05-08 11:54   
Repository: erp/mods/org.openbravo.module.unique.upc
Changeset: 477a8767f7802391af8935c9cc6468d7913d5af0
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri May 08 11:49:14 2015 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.unique.upc/rev/477a8767f7802391af8935c9cc6468d7913d5af0 [^]

Fixed bug 29400: Created module Unique Product UPC per Organization Tree

Avoid multiple products with the same UPC inside the organization's tree

Adds a new checkbox at Organization | Information tab to avoid using the same UPC in several products. The constraint affects the organization's child tree.

Note that this behavior is not backwards compatible. It means that the constraint will work only for the products created or updated just after installing & configuring this module

---
R src-db/database/model/modifiedTables/AD_ORGINFO.xml
R src-db/database/sourcedata/AD_COLUMN.xml
R src-db/database/sourcedata/AD_ELEMENT.xml
R src-db/database/sourcedata/AD_FIELD.xml
R src-db/database/sourcedata/AD_MESSAGE.xml
R src-db/database/sourcedata/AD_MODULE.xml
R src-db/database/sourcedata/AD_MODULE_DBPREFIX.xml
R src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
R src/org/openbravo/module/unique/upc/eventobserver/OBUUPC_ProductEventHandler.java
R src/org/openbravo/module/unique/upc/util/OBUUPC_Util.java
---
(0077239)
umartirena   
2015-05-08 14:13   
Code Review + Testing OK