Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046771Retail ModulesRetail APIpublic2021-05-21 08:242021-05-24 16:15
guillermogil 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR21Q3 
No
0046771: Assortment Post Call fails due to eventHandler
Assortment Post Call fails due to eventHandler

2021-05-20 17:43:32,291 [http-10] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ERROR: duplicate key value violates unique constraint "obretco_productcategory_un"
  Detail: Key (ad_client_id, m_product_category_id, obretco_productlist_id)=(83A757C2CEBB4EC5B4AF1A81AA91A10E, 53A088244F054F3DA5457559807E6245, 6CCE9577FD0442EEAAEB07E58845B5A9) already exists.

If you send the Assortment call with no ProductCategoryAssortment it will fail with the above error.
On a clean Assortment with no product Category
Do a call with multiple products with the same category
No tags attached.
Issue History
2021-05-21 08:24guillermogilNew Issue
2021-05-21 08:24guillermogilAssigned To => Retail
2021-05-21 08:24guillermogilResolution time => 1622239200
2021-05-21 08:24guillermogilTriggers an Emergency Pack => No
2021-05-21 09:58ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-05-21 13:55marvintmNote Added: 0128496
2021-05-24 08:12ranjith_qualiantech_comStatusnew => scheduled
2021-05-24 12:37hgbotNote Added: 0128555
2021-05-24 16:15hgbotResolutionopen => fixed
2021-05-24 16:15hgbotStatusscheduled => closed
2021-05-24 16:15hgbotFixed in Version => RR21Q3
2021-05-24 16:15hgbotNote Added: 0128576
2021-05-24 16:15hgbotNote Added: 0128577

Notes
(0128496)
marvintm   
2021-05-21 13:55   
As a solution for this issue, we should integrate the preference implemented here:

https://gitlab.com/obcustomers/NOR/org.openbravo.retail.posterminal/-/commit/5f35b196727929c35ef26a5fda799554985310dc [^]

The idea is to disable the associated EventHandler so that it doesn't cause this problem, and then the customer should schedule the background process to generate the product category information automatically
(0128555)
hgbot   
2021-05-24 12:37   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/431 [^]
(0128576)
hgbot   
2021-05-24 16:15   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 63c2e1adfad2397052b4efe083469d39dd00c9ec
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-05-24T14:14:41+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/63c2e1adfad2397052b4efe083469d39dd00c9ec [^]

Fixed ISSUE-46771: Added preference to avoid to create product categories when the product is added in assortment

---
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/retail/posterminal/event/ProductListEventHandler.java
---
(0128577)
hgbot   
2021-05-24 16:15   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/431 [^]