Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039114Retail ModulesStore Summary Reportpublic2018-08-09 14:172018-08-15 01:17
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
 
mtaal
No
0039114: Provide a convenient way to automatically add a business partner to a store when referenced from a transactional table
Currently there are event handler that act on some transactional tables that automatically add a business partner to a store if the bpo does not belongs already to it.

There are already some event handlers defined for it, each module that have a table of this type would require to create a new one.

It would be convenient to have a way to extend it, so that the tables the event handler acts on are not hard coded.
-
No tags attached.
related to feature request 0040664 closed AugustoMauch Allow the specify the column to use in the GenericBusinessPartnerSegmentationEventHandler to select the business partner 
Issue History
2018-08-09 14:17AugustoMauchNew Issue
2018-08-09 14:17AugustoMauchAssigned To => AugustoMauch
2018-08-09 14:17AugustoMauchTriggers an Emergency Pack => No
2018-08-09 14:54hgbotCheckin
2018-08-09 14:54hgbotNote Added: 0106256
2018-08-09 14:54hgbotCheckin
2018-08-09 14:54hgbotNote Added: 0106257
2018-08-09 14:54hgbotStatusnew => resolved
2018-08-09 14:54hgbotResolutionopen => fixed
2018-08-09 14:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/ef556f6ce171b4e6cbf19354e97f587c5defed8b [^]
2018-08-09 14:54hgbotCheckin
2018-08-09 14:54hgbotNote Added: 0106258
2018-08-09 14:54AugustoMauchReview Assigned To => mtaal
2018-08-10 18:33mtaalNote Added: 0106297
2018-08-10 18:33mtaalStatusresolved => new
2018-08-10 18:33mtaalResolutionfixed => open
2018-08-14 10:14hgbotCheckin
2018-08-14 10:14hgbotNote Added: 0106339
2018-08-14 10:14AugustoMauchStatusnew => scheduled
2018-08-14 10:14AugustoMauchStatusscheduled => resolved
2018-08-14 10:14AugustoMauchResolutionopen => fixed
2018-08-15 01:17mtaalNote Added: 0106352
2018-08-15 01:17mtaalStatusresolved => closed
2019-04-24 09:37AugustoMauchRelationship addedrelated to 0040664

Notes
(0106256)
hgbot   
2018-08-09 14:54   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 0fc4cd92c296d78adcc642276856183d290cd57b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Aug 09 14:50:06 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/0fc4cd92c296d78adcc642276856183d290cd57b [^]

Related with issue 39114: Creates OBSTSYN_AUTO_ADD_BP_STORE table

That table will store all the tables that should take part in the event handler that automatically
adds referenced business partner to the store of a transactional table, if the business partner
is not already part of the store.

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_DATASET_TABLE.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_TAB.xml
M src-db/database/sourcedata/AD_TABLE.xml
M src-db/database/sourcedata/AD_TREENODE.xml
M src-db/database/sourcedata/AD_WINDOW.xml
A src-db/database/model/tables/OBSTSYN_AUTO_ADD_BP_STORE.xml
---
(0106257)
hgbot   
2018-08-09 14:54   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: ef556f6ce171b4e6cbf19354e97f587c5defed8b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Aug 09 14:52:23 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/ef556f6ce171b4e6cbf19354e97f587c5defed8b [^]

Fixes issue 39114: Creates a generic event handler to auto add bp to stores

The event handler will act on all the tables defined in the obstsyn_auto_add_bp_store table.

It will obtain the business partner by fetching it from the 'businessPartner' property. If the
business partner is not already part of the store of the transactional table, it will automatically
add it.

---
A src/org/openbravo/retail/storeserver/synchronization/eventhandler/GenericBusinessPartnerSegmentationEventHandler.java
---
(0106258)
hgbot   
2018-08-09 14:54   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 80a04e92b4b7883db84ccf1bb24f9b142f3af83a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Aug 09 14:53:50 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/80a04e92b4b7883db84ccf1bb24f9b142f3af83a [^]

Related with issue 39114: Use generic event handler for C_Order and FIN_Payment

Both tables have been added to the OBSTSYN_AUTO_ADD_BP_STORE, and its custom event handler
has been removed.

---
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrderEventHandler.java
A src-db/database/sourcedata/OBSTSYN_AUTO_ADD_BP_STORE.xml
---
(0106297)
mtaal   
2018-08-10 18:33   
tested, reviewed, works

tiny comment, please update the javadoc here:

https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/80a04e92b4b7/src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrderEventHandler.java#l38 [^]
(0106339)
hgbot   
2018-08-14 10:14   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: db9e55af9419ca5fb49c0d12b7fde687dea9f104
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Aug 14 10:13:59 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/db9e55af9419ca5fb49c0d12b7fde687dea9f104 [^]

Related with issue 39114: Updates javadoc of OrderEventHandler

---
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrderEventHandler.java
---
(0106352)
mtaal   
2018-08-15 01:17   
reviewed