Openbravo Issue Tracking System - Retail Modules
View Issue Details
0055778Retail Modules[Modules] Openbravo Business APIpublic2024-06-14 19:372024-09-03 07:56
ivazquez 
sreehari 
highminoralways
closedfixed 
5
 
RR24Q4 
No
0055778: Update Alternative UOM Product
If you try in a single request to deactivate an existing UOM and create another one that has the same settings but changes the name and rate, the resulting EDL request will have the following error:

ERROR org.openbravo.retail.api.mappings.product.RetailApiImportProductJavaPropertyMappingHandler - Error while updating AlternateUOM for product 457E17BB12C64F2994B036AD3CAE2383

Tested in this live build:

https://livebuilds.openbravo.com/context/retail_pos2_modules_pgsql/security/Login [^]

Using the following API:

/ws/org.openbravo.api.ImportService/Product
-Search for a product (or create one) that does not have an Alternative UOM.
-Execute the API to create this alternative UOM and verify that it has been created correctly.
-Execute again the API but in the JSON of the alternativeUOM add the parameter "active": false
-Verify in the back office that it has been deactivated correctly.
-Change in the request the name and conversion rate of the alternativeUOM, in order to create a new one with a different name and rate but with the same parameters in the other fields (obviously removing the "active" parameter: false).
-You will see that nothing was updated and in the EDL Request window you will have the EDL generated by this request in error status.

Attached is a video demonstrating the problem
No tags attached.
related to defect 0053935 closed Rajesh_18 Modules Update UOM product 
? problemalternativeuomtworequests.mp4 (2,054,975) 2024-06-14 19:37
https://issues.openbravo.com/file_download.php?file_id=19918&type=bug
? Payload 2 (1,351) 2024-06-25 07:34
https://issues.openbravo.com/file_download.php?file_id=19935&type=bug
Issue History
2024-06-14 19:37ivazquezNew Issue
2024-06-14 19:37ivazquezAssigned To => Triage Platform Conn
2024-06-14 19:37ivazquezFile Added: problemalternativeuomtworequests.mp4
2024-06-14 19:37ivazquezRelationship addeddepends on 0053935
2024-06-14 19:37ivazquezRelationship deleteddepends on 0053935
2024-06-14 19:38ivazquezRelationship addedrelated to 0053935
2024-06-19 07:34marvintmAssigned ToTriage Platform Conn => Retail
2024-06-19 07:34marvintmStatusnew => acknowledged
2024-06-20 11:56sreehariAssigned ToRetail => sreehari
2024-06-20 11:56sreehariStatusacknowledged => scheduled
2024-06-24 07:02sreehariNote Added: 0166220
2024-06-25 07:34sreehariFile Added: Payload 2
2024-06-25 08:38egoitzSeveritymajor => minor
2024-06-26 05:48sreehariNote Added: 0166326
2024-06-26 11:34hgbotNote Added: 0166363
2024-08-30 19:52ivazquezNote Added: 0168613
2024-09-02 16:45marvintmProjectModules => Retail Modules
2024-09-03 07:53marvintmNote Added: 0168664
2024-09-03 07:55hgbotNote Added: 0168666
2024-09-03 07:55hgbotResolutionopen => fixed
2024-09-03 07:55hgbotStatusscheduled => closed
2024-09-03 07:55hgbotNote Added: 0168667
2024-09-03 07:56marvintmNote Added: 0168668
2024-09-03 07:56marvintmStatusclosed => resolved
2024-09-03 07:56marvintmFixed in Version => RR24Q4
2024-09-03 07:56marvintmStatusresolved => closed

Notes
(0166220)
sreehari   
2024-06-24 07:02   
EDL generated by request is due to the not the uom that is not available in the list of UOM defined, when the defined UOM is sent in the request the issue no longer exists.
(0166326)
sreehari   
2024-06-26 05:48   
When sending request with multiple AUOM with first UOM active=false, then we have EDL error.
(0166363)
hgbot   
2024-06-26 11:34   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/100 [^]
(0168613)
ivazquez   
2024-08-30 19:52   
Hello Team,

Any News?

Regards,
Ignacio Vazquez
(0168664)
marvintm   
2024-09-03 07:53   
Merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/100 [^]
(0168666)
hgbot   
2024-09-03 07:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/100 [^]
(0168667)
hgbot   
2024-09-03 07:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api [^]
Changeset: 57f75cf11b2c81aec375b6afb782be93a3322d9d
Author: Sreehari Venkataraman <sreehari.venkataraman.ext@openbravo.com>
Date: 03-09-2024 05:51:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/commit/57f75cf11b2c81aec375b6afb782be93a3322d9d [^]

Fixes ISSUE-55778: Added active and isNewOBObject case for multiAUOM
*Handled case when multiple alternate UOM is sent with active flag
*Optimized codes and created functions for validation and exeption

---
M src/org/openbravo/retail/api/mappings/product/RetailApiImportProductJavaPropertyMappingHandler.java
---
(0168668)
marvintm   
2024-09-03 07:56   
Checked that before fix, issue was reproducible (created product with alternate uom, then requested update with previous alternate uom disabled, and new uom -> failed)
Tested that initial creation of product with alternate works after fix
Tested that reproduced problem is no longer happening (requested update with previous alternate uom disabled, and new uom -> worked correctly)
Tested that duplicated alternate uoms still returns error