Openbravo Issue Tracking System - Modules
View Issue Details
0019320ModulesPOS-ERP Synchronization Web Servicepublic2011-12-16 11:372014-04-01 21:48
adrianromero 
adrianromero 
normalmajorhave not tried
closedfixed 
5
 
 
0019320: 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.
related to defect 00169232.40 closed adrianromero Java Client POS When synchronizing master data from ERP to POS, a deleted and re-created record in ERP raises an error in the process 
blocks backport 0019432 closed adrianromero Modules When synchronizing Products. If a search key has been modified in ERP, an error appears. 
Issue History
2011-12-16 11:37adrianromeroNew Issue
2011-12-16 11:37adrianromeroAssigned To => adrianromero
2011-12-16 11:37adrianromeroStatusnew => scheduled
2011-12-16 11:37adrianromerofix_in_branch => pi
2011-12-16 11:37adrianromeroRelationship addedrelated to 0016923
2011-12-16 12:44albertobgIssue Monitored: albertobg
2012-01-09 12:43adrianromeroIssue cloned0019432
2012-01-09 12:43adrianromeroRelationship addedblocks 0019432
2012-01-09 12:46adrianromeroNote Added: 0044148
2012-01-09 13:03hgbotCheckin
2012-01-09 13:03hgbotNote Added: 0044150
2012-01-09 13:03hgbotStatusscheduled => resolved
2012-01-09 13:03hgbotResolutionopen => fixed
2012-01-09 13:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/ec4f21c815d1b117c57a2b132c8b48f10ec6ed7a [^]
2012-01-11 09:54guilleaerNote Added: 0044230
2012-01-11 17:09hgbotCheckin
2012-01-11 17:09hgbotNote Added: 0044272
2012-01-11 17:09hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/ec4f21c815d1b117c57a2b132c8b48f10ec6ed7a [^] => http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/b91e2ebdb51b6555dfff34fe0755fceeb1ea67f6 [^]
2012-01-12 09:19guilleaerNote Added: 0044280
2014-04-01 21:48plujanNote Added: 0065746
2014-04-01 21:48plujanStatusresolved => closed

Notes
(0044148)
adrianromero   
2012-01-09 12:46   
Branch 3.0: 1.2.X
(0044150)
hgbot   
2012-01-09 13:03   
Repository: erp/pmods/org.openbravo.pos.sync
Changeset: ec4f21c815d1b117c57a2b132c8b48f10ec6ed7a
Author: Guillermo Álvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jan 09 12:51:54 2012 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/ec4f21c815d1b117c57a2b132c8b48f10ec6ed7a [^]

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

---
M resources/Initialization.ktr
M resources/Products.ktr
---
(0044230)
guilleaer   
2012-01-11 09:54   
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_"
(0044272)
hgbot   
2012-01-11 17:09   
Repository: erp/pmods/org.openbravo.pos.sync
Changeset: b91e2ebdb51b6555dfff34fe0755fceeb1ea67f6
Author: Guillermo Álvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Wed Jan 11 17:06:20 2012 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/b91e2ebdb51b6555dfff34fe0755fceeb1ea67f6 [^]

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

---
M resources/Customers.ktr
M resources/Products.ktr
---
(0044280)
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 3 firs characters of the product/customer id.
(0065746)
plujan   
2014-04-01 21:48   
Marked as Closed since it was in Resolved for too long