Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034188Retail ModulesStoreServerpublic2016-10-11 15:162016-11-01 23:41
AugustoMauch 
StoreServer 
normalmajorhave not tried
closedfixed 
5
 
RR16Q4 
mtaal
No
0034188: More tables should be taken into account in the business partner segmentation logic
There are two types of tables that are taken into account in the business partner segmentation logic:

- Tables if they contain a reference to a business partner, makes that business partner a non Standard Store Customer (i.e. ad_org.em_obretco_c_bpartner_id and AD_OrgInfo.c_bpartner_id). An event handler should make sure that if a new business partner is referenced in one of this tables, the business partner is set as non Standard.

- Tables that extend the information related with a business partner, so that if a business partner is added to a store, the info contained in those tables related with that business partner should also be sent to the store (i.e. ad_user, c_bpartner_location, c_location, etc).

This document [1] contains the list of tables that should be added to each of these two categories. To fix this issue, all those tables needs to be taken into account, and a generic event handler must be implemented to prevent having to create a specific event handler for each table of the first group.

[1] https://docs.google.com/spreadsheets/d/1gSSuOjaDpVjiFI4_arvQH92Z17vJhB7d1U_fc1dwn0M/edit#gid=0 [^]
-
No tags attached.
related to feature request 0032252RR16Q4 closed AugustoMauch Store Server Data Segmentation and Sync for BP 
Issue History
2016-10-11 15:16AugustoMauchNew Issue
2016-10-11 15:16AugustoMauchAssigned To => StoreServer
2016-10-11 15:16AugustoMauchTriggers an Emergency Pack => No
2016-10-11 15:16AugustoMauchRelationship addedrelated to 0032252
2016-10-12 19:59hgbotCheckin
2016-10-12 19:59hgbotNote Added: 0090541
2016-10-13 11:20hgbotCheckin
2016-10-13 11:20hgbotNote Added: 0090550
2016-10-13 11:20hgbotStatusnew => resolved
2016-10-13 11:20hgbotResolutionopen => fixed
2016-10-13 11:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/bfb5e54812d81e483b9a7f7b082b98643d8375ed [^]
2016-10-17 11:19mtaalReview Assigned To => mtaal
2016-11-01 23:41mtaalNote Added: 0091045
2016-11-01 23:41mtaalStatusresolved => closed
2016-11-01 23:41mtaalFixed in Version => RR16Q4

Notes
(0090541)
hgbot   
2016-10-12 19:59   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: e6072af327400104b8371dfb18cf3ffaf95f3cc9
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Oct 12 19:56:20 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/e6072af327400104b8371dfb18cf3ffaf95f3cc9 [^]

Related with issue 34188:More tables affect if a business partner is a customer

Now if a business partner is referenced in the m_shipper or the obpos_applications table, it will automatically will be flagged as a Non Standard Customer. This will result in the upcoming changes done to
that business partner being synchronized to all stores.

A generic event handler has been implemented to updated the Is Standard Customer flag of a business partner. Classes extending this generic event handler only need to provide the entity name and the proper
ty that references the business partner.

---
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrganizationEventHandlerForStandardCustomerFlag.java
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrganizationInfoEventHandlerForStandardCustomerFlag.java
M src/org/openbravo/retail/storeserver/synchronization/task/BusinessPartnerSegmentationPopulator_data.xsql
A src/org/openbravo/retail/storeserver/synchronization/eventhandler/GenericEventHandlerForStandardCustomerFlag.java
A src/org/openbravo/retail/storeserver/synchronization/eventhandler/OBPosApplicationsEventHandlerForStandardCustomerFlag.java
A src/org/openbravo/retail/storeserver/synchronization/eventhandler/ShippingCompanyEventHandlerForStandardCustomerFlag.java
---
(0090550)
hgbot   
2016-10-13 11:20   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: bfb5e54812d81e483b9a7f7b082b98643d8375ed
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Oct 13 11:17:17 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/bfb5e54812d81e483b9a7f7b082b98643d8375ed [^]

Fixes issue 34188: More tables will be synced when customer is added to a store

The following tables have been added to the list of tables that will be synced to a store when that customer is added to the store:
- m_product
- m_offer_bpartner
- m_rappel_bpartner
- c_bpartner_discount
- m_discountschemaline

---
M src-db/database/sourcedata/OBSTSYN_BP_RELATED_TABLE.xml
---
(0091045)
mtaal   
2016-11-01 23:41   
Reviewed and closed