Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044294Retail ModulesWeb POSpublic2020-06-05 12:232020-06-11 08:24
marvintm 
prakashmurugesan88 
normalmajoralways
closedfixed 
5
 
RR20Q3 
marvintm
No
0044294: Retail API: on the import endpoints, several mapped properties are referring to technical id instead of a readable identifie
We need to make sure that the referenced entities in the import endpoints are identified in the same way than in the exported ones. This means that if for example in the exported entity the client is identified using the name:

"client": "The White Valley"

Then in the imported JSON it should be identified in the same way.
Test the export endpoints of the Retail API. Then compare them with the JSON required for the import endpoints, and see that in several referenced entities, like the client, organization, or pricelist, currently you need to specify the technical UUID instead of readable properties like the search key or name.
No tags attached.
Issue History
2020-06-05 12:23marvintmNew Issue
2020-06-05 12:23marvintmAssigned To => Retail
2020-06-05 12:23marvintmTriggers an Emergency Pack => No
2020-06-05 12:29javietxeIssue Monitored: javietxe
2020-06-05 13:48prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2020-06-05 13:48prakashmurugesan88Statusnew => scheduled
2020-06-08 17:40hgbotCheckin
2020-06-08 17:40hgbotNote Added: 0120746
2020-06-08 17:40hgbotCheckin
2020-06-08 17:40hgbotNote Added: 0120747
2020-06-08 17:40hgbotCheckin
2020-06-08 17:40hgbotNote Added: 0120748
2020-06-08 17:40hgbotCheckin
2020-06-08 17:40hgbotNote Added: 0120749
2020-06-08 17:41prakashmurugesan88Note Added: 0120750
2020-06-08 17:41prakashmurugesan88Statusscheduled => resolved
2020-06-08 17:41prakashmurugesan88Resolutionopen => fixed
2020-06-11 08:24marvintmReview Assigned To => marvintm
2020-06-11 08:24marvintmStatusresolved => closed
2020-06-11 08:24marvintmFixed in Version => RR20Q3

Notes
(0120746)
hgbot   
2020-06-08 17:40   
Repository: erp/pmods/org.openbravo.retail.api
Changeset: 9ff07deda81bd2310110156b7fb7396e92440c3d
Author: Prakash M <prakash <at> qualiantech.com>
Date: Mon Jun 08 13:10:00 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.api/rev/9ff07deda81bd2310110156b7fb7396e92440c3d [^]

Related to BUG-44294: Changed Reference Id to Identifier in Retail API Imports

* Client Id to SearchKey
* Organization Id to SearchKey
* BusinessPartnerCategory Id to SearchKey
* Currency Id to ISOCode
* PriceList Id to Name
* PaymentTerms Id to Name
* PaymentMethod Id to Name
* UOM Id to Name
* TaxCategory Id to Name
* ProductCategory Id to SearchKey
* Product Id to SearchKey

* ProductAssortment Id to Name in JavaPropertyMapping

---
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
M src/org/openbravo/retail/api/mappings/product/ImportProductJavaPropertyMappingHandler.java
---
(0120747)
hgbot   
2020-06-08 17:40   
Repository: erp/pmods/org.openbravo.retail.api
Changeset: da50cf192450df9ce2e5e8b886ee09a4fc92b14d
Author: Prakash M <prakash <at> qualiantech.com>
Date: Mon Jun 08 21:08:44 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.api/rev/da50cf192450df9ce2e5e8b886ee09a4fc92b14d [^]

Related to BUG-44294: Retail API import should use same identifier user in export
instead of using ids.

* Changed Retail API Export properties to unique fields in the corresponding table
* Therefore same field can be used in import to identify records uniquely

---
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
---
(0120748)
hgbot   
2020-06-08 17:40   
Repository: erp/pmods/org.openbravo.retail.api
Changeset: 3aad2a509567c8b8ae0a13d07455ae717f275d66
Author: Prakash M <prakash <at> qualiantech.com>
Date: Mon Jun 08 21:08:44 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.api/rev/3aad2a509567c8b8ae0a13d07455ae717f275d66 [^]

Related to BUG-44294: Changed Reference Id to Identifier in Retail API Import Tests

---
M src-test/data/importer/Assortment.json
M src-test/data/importer/BusinessPartner.json
M src-test/data/importer/PriceList.json
M src-test/data/importer/Product.json
M src-test/data/importer/ProductCategory.json
M src-test/data/importer/ProductCharacteristic.json
---
(0120749)
hgbot   
2020-06-08 17:40   
Repository: erp/pmods/org.openbravo.retail.api
Changeset: 653998057705015115ee3789fd972a0636e0a5e9
Author: Prakash M <prakash <at> qualiantech.com>
Date: Mon Jun 08 21:09:47 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.api/rev/653998057705015115ee3789fd972a0636e0a5e9 [^]

Related to BUG-44294: Changed Product name to Product searchkey in Retail API Export Tests

---
M src-test/data/export/filter/productprice/ProductPriceByPriceListId.json
M src-test/data/export/filter/productprice/ProductPriceByPriceListName.json
M src-test/data/export/filter/productprice/ProductPriceByPriceListVersionId.json
M src-test/data/export/filter/productprice/ProductPriceByStoreId.json
M src-test/data/export/filter/productprice/ProductPriceByStoreName.json
M src-test/data/export/filter/productprice/ProductPriceByStoreSearchKey.json
---
(0120750)
prakashmurugesan88   
2020-06-08 17:41   
Updated Postman File,

https://drive.google.com/file/d/1M3x4sLdApT30W5P6x6RuE_c_X2OFbjqV/view?usp=sharing [^]