Openbravo Issue Tracking System - Java Client POS
View Issue Details
0016923Java Client POS(No Category)public2011-04-28 16:342011-12-02 15:24
adrianromero 
adrianromero 
urgentmajoralways
closedfixed 
5
 
2.40 
0016923: When synchronizing master data from ERP to POS, a deleted and re-created record in ERP raises an error in the process
In the current synchronization process when synchronizing master data: Customers, Products, ... If a record is deleted and created again in ERP with the same same an error is raised when synchronizing master data because the process will find a record with the same name but different id, in this case the process will try to insert a new record with the same name and an the unique index for names will fail.
1.- Create a master record in Openbravo ERP. For example one business partner and set as customer.
2.- Synchronize master data with Openbravo POS, a new customer will be created in the POS database
3.- Delete the business partner in Openbravo ERP and create new one with the same name
4.- Synchronize master data again with Openbravo POS and see that the process fails because the unique index form customer names will fail
When synchronizing master data if a record is beign to be synchronized and there exists in the POS a record with the same name but different id, and this id does not exist in ERP, then delete it first in the POS database.

It is supposed that this delete action is a legal action because if the record has been deleted in the ERP is because there are no relation ships to any document or data and for instance it will not be any relation ship in the POS. Fi for some reason the relation ship exists in POS but not in ERP. For example a receipt has been created in the POS that has not been synchronized to the ERP, the synchronization process will fail too.
No tags attached.
related to defect 0019320 closed adrianromero Modules When synchronizing Products. If a search key has been modified in ERP, an error appears. 
Issue History
2011-04-28 16:34adrianromeroNew Issue
2011-04-28 16:34adrianromeroAssigned To => mirurita
2011-04-28 16:38adrianromeroProposed Solution updated
2011-04-28 16:38adrianromeroAssigned Tomirurita => adrianromero
2011-04-28 16:38adrianromeroStatusnew => scheduled
2011-04-28 16:38adrianromeroTarget Version => 2.40
2011-04-28 16:39adrianromeroSummaryWhen synchronizing master data from ERP to POS, a deleted and created record in ERP raises an error in the process => When synchronizing master data from ERP to POS, a deleted and re-created record in ERP raises an error in the process
2011-05-09 19:08hgbotCheckin
2011-05-09 19:08hgbotNote Added: 0036577
2011-05-09 19:08hgbotStatusscheduled => resolved
2011-05-09 19:08hgbotResolutionopen => fixed
2011-05-09 19:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/e89f6ef6cc7c80f9f4af22cd6948d222d7f316a3 [^]
2011-05-09 19:25adrianromeroNote Added: 0036578
2011-05-12 18:46adrianromeroNote Added: 0036914
2011-06-03 10:57dalsasuaAssigned Toadrianromero => dalsasua
2011-06-03 12:22dalsasuaAssigned Todalsasua => adrianromero
2011-12-02 15:24adrianromeroStatusresolved => closed
2011-12-16 11:37adrianromeroRelationship addedrelated to 0019320
2012-11-07 09:40priyamCategory02 - ERP-POS Integration => (No Category)

Notes
(0036577)
hgbot   
2011-05-09 19:08   
Repository: erp/pmods/org.openbravo.pos.sync
Changeset: e89f6ef6cc7c80f9f4af22cd6948d222d7f316a3
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon May 09 19:00:29 2011 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/e89f6ef6cc7c80f9f4af22cd6948d222d7f316a3 [^]

Fixes issue 0016923: When synchronizing master data from ERP to POS, a deleted and re-created record in ERP raises an error in the process
It has been modified the update/insert step to use the field Search Key instead of ID. This change allows recreated elements with the same search key in Openbravo ERP to be properly synchronized to POS

---
M resources/Customers.ktr
M resources/Products.ktr
M resources/Taxes.ktr
---
(0036578)
adrianromero   
2011-05-09 19:25   
* Testing the issue

Synchronize Openbravo POS and Openbravo ERP following the documentation and using the new published module.http://wiki.openbravo.com/wiki/Openbravo_POS_Integration. [^] An verify it works.

Create a new product in ERP an synchronize, verify that the new product has been created

Delete the product in ERP and create it again with the new search key

Syncrhonize again and verify that the new product has been properly synchronized updating the previous product created with the same key.

* Other areas affected

No other areas affected, only the synchronization jobs.
(0036914)
adrianromero   
2011-05-12 18:46   
With the modifications done to fix this issue, now Products and Business partners are synchronized by "Search Key" this means for example that Products with the same search key in ERP and POS have the same search key value will be considered the same product.