Openbravo Issue Tracking System - Modules
View Issue Details
0019432ModulesPOS-ERP Synchronization Web Servicepublic2012-01-09 12:432014-04-01 21:48
adrianromero 
adrianromero 
normalmajorhave not tried
closedfixed 
5
 
 
OBPS
0019432: When synchronizing Products. If a search key has been modified in ERP, an error appears.
Because the synchronization of master data is by search key, if the search key is modified, an error appears in the synchronization process
* Create products in ERP
* Synchronize products with POS
* Modify in ERP one of the produts synchronized by changing the search key field
* Synchronize again products.

A synchronization error will appear
The problem is because the synchronization process search products by search key instead by ID. This was changed because of issue 16923.

The correct solution is to revert the change and synchronize by ID. And to fix the issue reported in 16923 it must be detected collisions when the process tries to synchronize products with the same search key and different ID. In this case it must be taken the POS product as invalid.
No tags attached.
depends on defect 0019320 closed adrianromero When synchronizing Products. If a search key has been modified in ERP, an error appears. 
Issue History
2012-01-09 12:43adrianromeroNew Issue
2012-01-09 12:43adrianromeroAssigned To => adrianromero
2012-01-09 12:43adrianromeroOBNetwork customer => Yes
2012-01-09 12:43adrianromeroIssue generated from0019320
2012-01-09 12:43adrianromeroRelationship addeddepends on 0019320
2012-01-09 12:45adrianromeroNote Added: 0044147
2012-01-09 12:45adrianromeroStatusnew => scheduled
2012-01-09 12:45adrianromeroTypedefect => backport
2012-01-09 13:05hgbotCheckin
2012-01-09 13:05hgbotNote Added: 0044151
2012-01-09 13:05hgbotStatusscheduled => resolved
2012-01-09 13:05hgbotResolutionopen => fixed
2012-01-09 13:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/cdcd79023b4926282238ba23175ced44339be2fa [^]
2012-01-11 09:56guilleaerNote Added: 0044231
2012-01-11 17:10hgbotCheckin
2012-01-11 17:10hgbotNote Added: 0044273
2012-01-11 17:10hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/cdcd79023b4926282238ba23175ced44339be2fa [^] => http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/fa88e6e9d621be64c0c7a3855c1b723b1c5c75b7 [^]
2012-01-12 09:19guilleaerNote Added: 0044281
2014-04-01 21:48plujanNote Added: 0065745
2014-04-01 21:48plujanStatusresolved => closed

Notes
(0044147)
adrianromero   
2012-01-09 12:45   
Branch 2.50: 1.0.X
(0044151)
hgbot   
2012-01-09 13:05   
Repository: erp/pmods/org.openbravo.pos.sync
Changeset: cdcd79023b4926282238ba23175ced44339be2fa
Author: Guillermo Álvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jan 09 12:53:34 2012 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/cdcd79023b4926282238ba23175ced44339be2fa [^]

Fixed issue 19432: Syncronization problem when the search key is modified has been solved.

---
M resources/Initialization.ktr
M resources/Products.ktr
---
(0044231)
guilleaer   
2012-01-11 09:56   
The issue has been resolved modifying 2 transformations:
1.Initialization.ktr -> Concat function for postgresql databases has been defined.
2.Products.ktr -> Some updates are performed in database. This updates avoids problems with the search keys.

Test plan:
1. Synchronize all the products
2. Create a new product with search key "product_A"
3. Synchronize all the products
4. Verify if all the products are available in POS
5. Create an other product with search key "product_B"
6. Synchronize all the products
7. Verify if all the products are available in POS
8. Remove "product_A" from ERP
9. Change the search key of the "product_B" to "product_A" in ERP
10.Synchronize all the products
11.In POS the old "product_A" should appear in this form "PSYNC_product_A", in addition the old "product_B" now appears with the new search key "product_A"

Regressions:
- This changes only affects to the products synchronization process.
- All the products which are defined in the POS DB and not in the ERP will be renamed and the search key will change. The new name and the new search key will be the same with the prefix "PSYNC_"
(0044273)
hgbot   
2012-01-11 17:10   
Repository: erp/pmods/org.openbravo.pos.sync
Changeset: fa88e6e9d621be64c0c7a3855c1b723b1c5c75b7
Author: Guillermo Álvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Wed Jan 11 17:08:05 2012 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/fa88e6e9d621be64c0c7a3855c1b723b1c5c75b7 [^]

Fixed issue 19432: Syncronization problem when the search key is modified has been solved.

---
M resources/Customers.ktr
M resources/Products.ktr
---
(0044281)
guilleaer   
2012-01-12 09:19   
Two new modifications has been done affecting to the following transformations.
1.Products.ktr -> The prefix now is created concatenating this characters:
   - 2 characters -> PS (POS synchronization)
   - 3 characters -> The three first characters of product/customer id
   - 1 character -> '_' to separate the prefix
2.Customers.ktr -> The problem with the changes in the search key has been solved. The same algorithm used in the products synchronization process has been used.

Test plan:
1. Synchronize all the products/customers
2. Create a new product/customer with search key "product_A"/"customer_A"
3. Synchronize all the products/customers
4. Verify if all the products/customers are available in POS
5. Create an other product/customer with search key "product_B"/"customer_B"
6. Synchronize all the products/customers
7. Verify if all the products/customers are available in POS
8. Remove "product_A"/"customer_A" from ERP
9. Change the search key of the "product_B"/"customer_B" to "product_A"/"customer_A" in ERP
10.Synchronize all the products/customers
11.In POS the old "product_A"/"customer_A" should appear in this form "PS???_product_A"/"PS???customer_B", in addition the old "product_B"/"customer_B" now appears with the new search key "product_A"/"customer_A"

Regressions:
- This changes affects to the products and customers synchronization process.
- All the products/customers which are defined in the POS DB and not in the ERP will be renamed and the search key will change. The new name and the new search key will be the same with the prefix "PS???_"

??? are the first 3 characters of the product/customer id.
(0065745)
plujan   
2014-04-01 21:48   
Marked as Closed since it was in Resolved for too long