Openbravo Issue Tracking System - Retail Modules
View Issue Details
0054805Retail ModulesRetail API Discountpublic2024-02-29 13:572024-04-16 11:18
AgatheBertin 
Rajesh_18 
normalmajorhave not tried
closedfixed 
5
 
 
No
0054805: API Discount : Error when importing promotion "Discretionary Fixed Amount"
When importing json from discount API with a promotion type Discretionary Fixed Amount, the EDL request is in error with this message : Error while importing an item: class java.lang.String cannot be cast to class org.openbravo.base.structure.BaseOBObject (java.lang.String is in module java.base of loader 'bootstrap'; org.openbravo.base.structure.BaseOBObject is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @53dacd14)
Try to import a discount trough the API openbravo/ws/org.openbravo.api.ImportService/Promotion


{"client":"XXXX","organization":"*","name":"TESTMANTIS","discountAmount":0,"discountPercentage":5,"startingDate":"2024-02-01","includedBusinessPartners":"Y","includedBPCategories":"Y","includedProducts":"Y","includedProductCategories":"Y","includedOrganizations":"Y","includePriceLists":"Y","includedCharacteristics":"Y","includedRoles":"Y","excludedCharacteristics":"A","includedExternalBusinessPartners":"Y","discountType":"Discretionary Fixed Amount","applyNextDiscount":true,"priceAdjustmentScope":"A","priceAdjustmentType":"P","priceAdjustmentAmount":0,"priceAdjustmentPercentage":10,"distributeBetweenLines":false,"approvalRequired":false,"allowMultipleInstances":false,"applyAfterAutomaticDiscounts":false,"allowInNegativeLines":false,"allowIncreaseLinePrice":true,"totalReceiptAmount":100,"totalPercentageDiscount":15,"isCoupon":false,"amount":4,"currency":"EUR","buyXGiftYSubtype":"BUYALLXGIFTALLY","applyOnce":false,"applicationMethod":"discretionary","verifyPriceLimit":true,"isOTFCoupon":false,"otfApplyMinCouponAmount":false,"applyToProductsUpToTheMaxQuantity":false,"applyMinCouponAmount":false,"organizations":[],"priceLists":[],"products":[],"productCategories":[],"incompatibleDiscounts":[],"availability":[],"businessPartnerCategories":[],"businessPartnerSets":[],"characteristics":[],"crmPropertyConditions":[],"freeProducts":[],"comboFamilies":[],"priceScales":[],"loyaltyPrograms":[]}
No tags attached.
Issue History
2024-02-29 13:57AgatheBertinNew Issue
2024-02-29 13:57AgatheBertinAssigned To => Retail
2024-02-29 13:57AgatheBertinTriggers an Emergency Pack => No
2024-03-08 14:02jorgewederagoStatusnew => acknowledged
2024-03-11 12:03Rajesh_18Assigned ToRetail => Rajesh_18
2024-03-11 12:04Rajesh_18Statusacknowledged => scheduled
2024-03-12 11:50hgbotNote Added: 0162014
2024-03-15 13:11hgbotNote Added: 0162230
2024-03-15 13:11hgbotResolutionopen => fixed
2024-03-15 13:11hgbotStatusscheduled => closed
2024-03-15 13:11hgbotNote Added: 0162231
2024-04-12 08:21AgatheBertinNote Added: 0163125
2024-04-12 08:21AgatheBertinStatusclosed => new
2024-04-12 08:21AgatheBertinResolutionfixed => open
2024-04-12 11:11hgbotNote Added: 0163145
2024-04-15 13:01jorgewederagoStatusnew => scheduled
2024-04-16 09:40kchoperenaNote Added: 0163252
2024-04-16 11:17hgbotNote Added: 0163257
2024-04-16 11:18hgbotNote Added: 0163258
2024-04-16 11:18jorgewederagoStatusscheduled => resolved
2024-04-16 11:18jorgewederagoResolutionopen => fixed
2024-04-16 11:18jorgewederagoStatusresolved => closed

Notes
(0162014)
hgbot   
2024-03-12 11:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/87 [^]
(0162230)
hgbot   
2024-03-15 13:11   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/87 [^]
(0162231)
hgbot   
2024-03-15 13:11   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api [^]
Changeset: 857ef2aee756514a24f77885e136d223c5e4c1fe
Author: Rajesh Senthilkumar <rajesh@qualiantech.com>
Date: 15-03-2024 12:11:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/commit/857ef2aee756514a24f77885e136d223c5e4c1fe [^]

Fixed ISSUE-54805: Refactored Property path of currency for Promotion API

---
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
---
(0163125)
AgatheBertin   
2024-04-12 08:21   
tested, same issue
(0163145)
hgbot   
2024-04-12 11:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/254 [^]
(0163252)
kchoperena   
2024-04-16 09:40   
Integration failing with the next JSON (remember to update the client searchkey):

[{"client":"Gifi","organization":"*","name":"disc amount 7","priority":0,"startingDate":"2024-02-07","includedBusinessPartners":"Y","obcomopPriceRule":"ANY","includedBPCategories":"Y","includedProducts":"Y","includedProductCategories":"Y","includedOrganizations":"Y","includePriceLists":"Y","includedCharacteristics":"Y","includedRoles":"Y","excludedCharacteristics":"A","includedExternalBusinessPartners":"Y","discountType":"Discretionary Fixed Amount","applyNextDiscount":true,"priceAdjustmentScope":"A","priceAdjustmentType":"P","distributeBetweenLines":false,"priceAdjustmentAmount":0,"priceAdjustmentPercentage":0,"currency":"EUR","amount":7,"approvalRequired":false,"allowMultipleInstances":false,"applyAfterAutomaticDiscounts":false,"allowInNegativeLines":false,"allowIncreaseLinePrice":true,"isCoupon":false,"buyXGiftYSubtype":"BUYALLXGIFTALLY","applyOnce":false,"applicationMethod":"discretionary","verifyPriceLimit":true,"isOTFCoupon":false,"otfApplyMinCouponAmount":false,"applyToProductsUpToTheMaxQuantity":false,"applyMinCouponAmount":false,"organizations":[],"priceLists":[],"products":[],"productCategories":[],"incompatibleDiscounts":[],"availability":[],"businessPartnerCategories":[],"businessPartnerSets":[],"characteristics":[],"crmPropertyConditions":[],"freeProducts":[],"comboFamilies":[],"priceScales":[]}]
(0163257)
hgbot   
2024-04-16 11:17   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/254 [^]
(0163258)
hgbot   
2024-04-16 11:18   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: 97606449d678b0506574ab4b320821f36e8226de
Author: Rajesh Senthilkumar <rajesh@qualiantech.com>
Date: 16-04-2024 09:17:16
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/97606449d678b0506574ab4b320821f36e8226de [^]

Related to ISSUE-54805: Refactored priority property mapping for promotion API

---
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
---