Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037353Retail ModulesStoreServerpublic2017-11-22 11:212017-12-13 22:18
ioritzCia 
AugustoMauch 
highmajoralways
closedfixed 
30CentOS 6
 
 
mtaal
No
0037353: EM_OBRETCO_RETAILORGTYPE column for orgs not in natural tree dataset should be excluded
Dataset for organizations not in natural tree should exclude EM_OBRETCO_RETAILORGTYPE column. Stores that are not in naturall tree are exported excluding EM_OBRETCO_C_BPARTNER_ID and EM_OBRETCO_C_BP_LOCATION_ID columns and there is EM_OBRETCO_ORG_POS_CHK check constraing which does not allow for EM_OBRETCO_RETAILORGTYPE = 'S' rows to have them empty. This makes install.source in the store server to give an error.

Remember to exclude from symmetric synchronization.
In a multiserver environment with more than one store not in the same natural tree.
Export one store
Import it with install source
This error appears in the install source:
SQL Command failed with: ERROR: check constraint "em_obretco_org_pos_chk" is violated by some row

-- END

ALTER TABLE AD_ORG

    ADD CONSTRAINT EM_OBRETCO_ORG_POS_CHK CHECK (EM_OBRETCO_RETAILORGTYPE = 'S' AND EM_OBRETCO_C_BPARTNER_ID IS NOT NULL AND EM_OBRETCO_C_BP_LOCATION_ID IS NOT NULL OR EM_OBRETCO_RETAILORGTYPE <> 'S')
Dataset for organizations not in natural tree should exclude EM_OBRETCO_RETAILORGTYPE column
No tags attached.
caused by defect 0037204 closed AugustoMauch Anonymous customer and its location should be excluded for orgs not in natural org tree 
Issue History
2017-11-22 11:21ioritzCiaNew Issue
2017-11-22 11:21ioritzCiaAssigned To => StoreServer
2017-11-22 11:21ioritzCiaResolution time => 1512687600
2017-11-22 11:21ioritzCiaTriggers an Emergency Pack => No
2017-11-22 11:21ioritzCiaOS VersionOpenbravo Appliance 14.04 => CentOS 6
2017-11-22 11:37ioritzCiaDescription Updatedbug_revision_view_page.php?rev_id=16338#r16338
2017-11-30 11:29mtaalRelationship addedcaused by 0037204
2017-11-30 11:30mtaalNote Added: 0100828
2017-11-30 11:30mtaalAssigned ToStoreServer => AugustoMauch
2017-12-13 15:20hgbotCheckin
2017-12-13 15:20hgbotNote Added: 0101016
2017-12-13 15:20hgbotStatusnew => resolved
2017-12-13 15:20hgbotResolutionopen => fixed
2017-12-13 15:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/83f73488abc97cb62861dd2fb137e08ab1f994c1 [^]
2017-12-13 21:54mtaalReview Assigned To => mtaal
2017-12-13 22:18mtaalNote Added: 0101026
2017-12-13 22:18mtaalStatusresolved => closed

Notes
(0100828)
mtaal   
2017-11-30 11:30   
The change in 37204 has been backed out for now so the cause of this issue has been resolved. However, it is better to revisit the complete topic.
(0101016)
hgbot   
2017-12-13 15:20   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 83f73488abc97cb62861dd2fb137e08ab1f994c1
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Dec 13 15:20:34 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/83f73488abc97cb62861dd2fb137e08ab1f994c1 [^]

Fixes issue 37204, fixes issue 37353: Excludes columns from ad_org

The following columns are excluded from ad_org for those orgs not included in the org natural tree of the store being exported:
- EM_Obretco_C_Bpartner_ID
- EM_Obretco_C_bp_Location_ID
- EM_OBRETCO_RETAILORGTYPE

This way, the EM_OBRETCO_ORG_POS_CHK constraint is no longer working when installing the new store.

---
M src-db/database/sourcedata/AD_DATASET_COLUMN.xml
---
(0101026)
mtaal   
2017-12-13 22:18   
Reviewed