Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039722Retail ModulesStoreServerpublic2018-11-30 10:092018-12-10 16:24
ioritzCia 
mtaal 
normalmajorhave not tried
closedfixed 
30CentOS 6.9
 
 
AugustoMauch
No
0039722: Synchronizaiton gets broken with location of organization information or warehouse tab
Synchronization gets broken with this message:

The ad_orginfo table is getting synchronized to all store servers and it's c_location_id does not
ERROR: insert or update on table "ad_orginfo" violates foreign key constraint "c_location_ad_orginfo"
  Detail: Key (c_location_id)=(9B0DBDA13B46433E91BB20AD8DB5E485) is not present in table "c_location"
There are no steps yet
This happens because the address is created first in the backoffice flow. The address is then stored in the db. At this point it is not yet linked to an org, so not synced.
When the warehouse record is saved the system tries to sync it, but the address is not synced as at that point that record is not changed.
Add a trigger to the m_warehouse and ad_orginfo table to touch the related c_location record in the same transaction.
No tags attached.
png Screenshot from 2018-12-04 20-52-20.png (124,066) 2018-12-04 22:51
https://issues.openbravo.com/file_download.php?file_id=12413&type=bug
png
Issue History
2018-11-30 10:09ioritzCiaNew Issue
2018-11-30 10:09ioritzCiaAssigned To => StoreServer
2018-11-30 10:09ioritzCiaTriggers an Emergency Pack => No
2018-12-02 21:40mtaalAssigned ToStoreServer => mtaal
2018-12-04 22:51mtaalSummarySynchronizaiton gets broken with location of organization information tab => Synchronizaiton gets broken with location of organization information or warehouse tab
2018-12-04 22:51mtaalSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17998#r17998
2018-12-04 22:51mtaalProposed Solution updated
2018-12-04 22:51mtaalFile Added: Screenshot from 2018-12-04 20-52-20.png
2018-12-05 09:13hgbotCheckin
2018-12-05 09:13hgbotNote Added: 0108265
2018-12-05 09:13hgbotStatusnew => resolved
2018-12-05 09:13hgbotResolutionopen => fixed
2018-12-05 09:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/67aa141aacbf12c8f81b5424bc69a273b472bacd [^]
2018-12-07 11:55hgbotCheckin
2018-12-07 11:55hgbotNote Added: 0108325
2018-12-08 22:28mtaalNote Added: 0108342
2018-12-09 22:06mtaalReview Assigned To => AugustoMauch
2018-12-09 22:25mtaalNote Added: 0108349
2018-12-10 16:24AugustoMauchNote Added: 0108369
2018-12-10 16:24AugustoMauchStatusresolved => closed

Notes
(0108265)
hgbot   
2018-12-05 09:13   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 67aa141aacbf12c8f81b5424bc69a273b472bacd
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Dec 05 09:13:05 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/67aa141aacbf12c8f81b5424bc69a273b472bacd [^]

Fixes issue 39722: Synchronizaiton gets broken with location of organization information or warehouse tab
use a trigger to force syncing the c_location before its dependent record

---
A src-db/database/model/triggers/OBSTSYN_UPDATE_BPLOC_TRG.xml
A src-db/database/model/triggers/OBSTSYN_UPDATE_ORGLOC_TRG.xml
A src-db/database/model/triggers/OBSTSYN_UPDATE_WHLOC_TRG.xml
---
(0108325)
hgbot   
2018-12-07 11:55   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 0ecc51f88a6f2e91ae5a79a95e7f51daee2b308c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Dec 07 11:55:47 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/0ecc51f88a6f2e91ae5a79a95e7f51daee2b308c [^]

Related to issue 39722: Synchronizaiton gets broken with location of organization information or warehouse tab
Solve formatting error

---
M src-db/database/model/triggers/OBSTSYN_UPDATE_BPLOC_TRG.xml
M src-db/database/model/triggers/OBSTSYN_UPDATE_ORGLOC_TRG.xml
M src-db/database/model/triggers/OBSTSYN_UPDATE_WHLOC_TRG.xml
---
(0108342)
mtaal   
2018-12-08 22:28   
Additional push:
https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/70ffe5d61be4 [^]
(0108349)
mtaal   
2018-12-09 22:25   
Added test
http://code.openbravo.com/tools/automation/pi-mobile/rev/22011f880e13920c6bbf3fcee781cab749338295 [^]
(0108369)
AugustoMauch   
2018-12-10 16:24   
Code reviewed and verified