Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040103Retail ModulesStoreServerpublic2019-02-01 13:172019-02-04 16:04
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
 
AugustoMauch
No
0040103: Sync error with specific flow related to BP
A sync error occurs in some cases. See the linked document.

The theory is that this happens:
- BP does not yet belong to a store
- address is added to the BP through the store webpos, this does not yet add the BP to the store
- ticket is created for the BP, the BP is added to the store
- sym-ds sees the bp address change and creates a batch with the bplocation insert before the BP update, as the BP is now part of the store it tries to send it there.
- sym-ds creates a batch for the ticket also

I tested this scenario and it was tested by QA, for us it works. This leads me to think is a timing issue.
See description
Possibly add a trigger to bp location to touch the BP before the bplocation is saved
No tags attached.
has duplicate defect 0039730 closed mtaal BP Location synced before BP 
csv sync_bp_error_1feb.csv (4,890) 2019-02-01 13:17
https://issues.openbravo.com/file_download.php?file_id=12601&type=bug
png add_loc_before_change.png (36,891) 2019-02-02 12:52
https://issues.openbravo.com/file_download.php?file_id=12605&type=bug
png

png update_order_after_change.png (58,241) 2019-02-02 13:02
https://issues.openbravo.com/file_download.php?file_id=12606&type=bug
png
Issue History
2019-02-01 13:17mtaalNew Issue
2019-02-01 13:17mtaalAssigned To => mtaal
2019-02-01 13:17mtaalFile Added: sync_bp_error_1feb.csv
2019-02-01 13:17mtaalTriggers an Emergency Pack => No
2019-02-02 12:52mtaalFile Added: add_loc_before_change.png
2019-02-02 13:02hgbotCheckin
2019-02-02 13:02hgbotNote Added: 0109455
2019-02-02 13:02hgbotStatusnew => resolved
2019-02-02 13:02hgbotResolutionopen => fixed
2019-02-02 13:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/975f579280a837ee41d2c5f399498d260a297c8c [^]
2019-02-02 13:02mtaalFile Added: update_order_after_change.png
2019-02-02 13:03mtaalReview Assigned To => AugustoMauch
2019-02-02 13:06mtaalRelationship addedhas duplicate 0039730
2019-02-03 11:20hgbotCheckin
2019-02-03 11:20hgbotNote Added: 0109461
2019-02-04 15:50hgbotCheckin
2019-02-04 15:50hgbotNote Added: 0109533
2019-02-04 16:04AugustoMauchNote Added: 0109535
2019-02-04 16:04AugustoMauchStatusresolved => closed

Notes
(0109455)
hgbot   
2019-02-02 13:02   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 975f579280a837ee41d2c5f399498d260a297c8c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sat Feb 02 13:02:10 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/975f579280a837ee41d2c5f399498d260a297c8c [^]

Fixes issue 40103: Sync error with specific flow related to BP
Also touch BP to ensure correct order of creation

---
M src-db/database/model/triggers/OBSTSYN_UPDATE_BPLOC_TRG.xml
---
(0109461)
hgbot   
2019-02-03 11:20   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: b84f1f35504df0b24c4c0b5d060b9b6e04eb629c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Feb 03 11:20:07 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/b84f1f35504df0b24c4c0b5d060b9b6e04eb629c [^]

Related to issue 40103: Sync error with specific flow related to BP
Only needed to touch the location and bp in insert mode in other modes it is full bp sync

---
M src-db/database/model/triggers/OBSTSYN_UPDATE_BPLOC_TRG.xml
---
(0109533)
hgbot   
2019-02-04 15:50   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: a5a8a0ed861bd9025c00d1d39c26248104a969db
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Feb 04 15:50:45 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/a5a8a0ed861bd9025c00d1d39c26248104a969db [^]

Related with issue 40103: Trigger should be insert-only

---
M src-db/database/model/triggers/OBSTSYN_UPDATE_BPLOC_TRG.xml
---
(0109535)
AugustoMauch   
2019-02-04 16:04   
Code reviewed and verified