Openbravo Issue Tracking System - Modules
View Issue Details
0055758ModulesUnique Product UPCpublic2024-06-12 19:052024-07-08 13:56
sdossantos 
Triage Omni OMS 
normalminoralways
closedfixed 
5
1.1.2 
 
0055758: Unique UPC in product
If I configure the same upc that is in the header on the same product, it fails. This should work because it is the same product.
1- Add upc in the tab of the multiupc, the same upc in the header of the product
We see the error

Attached the image
at line 79
// Check UPC in Product
final OBQuery<Product> productQuery = OBDal.getInstance()
.createQuery(Product.class,
"as e where e.uPCEAN = :upcValue and e.organization.id = :orgId");
productQuery.setNamedParameter("upcValue", newUpc);
productQuery.setNamedParameter("orgId", orgId);
productQuery.setFilterOnReadableOrganization(false);
productQuery.setMaxResult(10);
List<Product> listProduct = productQuery.list();
if (listProduct.size() > 0) {
Product p = listProduct.get(0);
for (Product product : listProduct) {
if(!p.getId().equals(product.getId()))
{
listProductName.add(product.getName());
}
}
}

if (listProductName.size() > 0) {
throw new OBException(String.format(OBMessageUtils.messageBD("OBMUPC_DUPLICATED_UPC"),
String.join(", ", listProductName)));
}
}
No tags attached.
causes defect 0056292 closed kousalya_r Retail Modules MultiUPC Validation is not working 
png Captura de pantalla -2024-06-12 14-00-44.png (172,939) 2024-06-12 19:05
https://issues.openbravo.com/file_download.php?file_id=19912&type=bug
png
Issue History
2024-06-12 19:05sdossantosNew Issue
2024-06-12 19:05sdossantosAssigned To => Triage Omni OMS
2024-06-12 19:05sdossantosFile Added: Captura de pantalla -2024-06-12 14-00-44.png
2024-06-12 19:30frank_gonzalezNote Added: 0165866
2024-06-18 13:27sdossantosProposed Solution updated
2024-06-18 18:20hgbotNote Added: 0166076
2024-06-24 21:59sdossantosPriorityhigh => normal
2024-06-24 21:59sdossantosSeveritymajor => minor
2024-07-02 14:39sdossantosNote Added: 0166607
2024-07-03 08:18hgbotResolutionopen => fixed
2024-07-03 08:18hgbotStatusnew => resolved
2024-07-03 08:18hgbotNote Added: 0166620
2024-07-03 08:18hgbotNote Added: 0166621
2024-07-08 13:56aferrazStatusresolved => closed
2024-08-22 07:01guillermogilRelationship addedcauses 0056292

Notes
(0165866)
frank_gonzalez   
2024-06-12 19:30   
Jira: https://openbravo.atlassian.net/browse/RM-14669 [^]
(0166076)
hgbot   
2024-06-18 18:20   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.multiupc/-/merge_requests/7 [^]
(0166607)
sdossantos   
2024-07-02 14:39   
any news?
(0166620)
hgbot   
2024-07-03 08:18   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.multiupc [^]
Changeset: 8d148768b26ee8375e8102e94376edd2d6193e3e
Author: Kousalya Ramasamy <kousalya.ramasamy@openbravo.com>
Date: 03-07-2024 06:16:19
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.multiupc/-/commit/8d148768b26ee8375e8102e94376edd2d6193e3e [^]

Fixed ISSUE-55758: MultiUPC validation

---
M src/org/openbravo/multiupc/event/NoDuplicateUpcHandler.java
---
(0166621)
hgbot   
2024-07-03 08:18   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.multiupc/-/merge_requests/7 [^]