Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037513Retail ModulesStoreServerpublic2017-12-19 15:152018-06-05 13:51
AugustoMauch 
jonibc 
normalmajorhave not tried
closedfixed 
5
 
RR18Q3 
marvintm
No
0037513: org.openbravo.retail.contactinfoforproduct should have an event handler to manage business partner segmentation
In order to manage the business partner segmentation, it is required to know to what versions does each business partner belong.

This event handler [1] automatically assigns a store to a business partner if the business partner is used in an order that belongs to an organization that the business partner does not belong to yet.

The same should be done when an orderline is created whose EM_OBRCIFP_C_BPARTNER_ID column points to a business partner that does not belong to the organization of the order line. The event handler [1] can be used as a template to implement the new one.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/tip/src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrderEventHandler.java [^]
To be defined by the team that fixes the issue, I don't know how the EM_OBRCIFP_C_BPARTNER_ID column is filled in Web POS.
No tags attached.
related to defect 0039936 closed guillermogil org.openbravo.retail.contactinfoforproduct hook is looking for a wrong BP 
Issue History
2017-12-19 15:15AugustoMauchNew Issue
2017-12-19 15:15AugustoMauchAssigned To => asiermartirena
2017-12-19 15:15AugustoMauchTriggers an Emergency Pack => No
2018-04-26 16:14hgbotCheckin
2018-04-26 16:14hgbotNote Added: 0104108
2018-04-26 16:14hgbotStatusnew => resolved
2018-04-26 16:14hgbotResolutionopen => fixed
2018-04-26 16:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.contactinfoforproduct.synchronization/rev/7f15b019a837fa270d1b94698fc33f46cd1924d4 [^]
2018-05-24 19:11dmitry_mezentsevNote Added: 0104682
2018-05-29 19:27marvintmAssigned Toasiermartirena => jonibc
2018-05-29 19:27marvintmNote Added: 0104789
2018-05-29 19:27marvintmStatusresolved => new
2018-05-29 19:27marvintmResolutionfixed => open
2018-06-05 13:06hgbotCheckin
2018-06-05 13:06hgbotNote Added: 0104938
2018-06-05 13:08marvintmStatusnew => scheduled
2018-06-05 13:10marvintmStatusscheduled => resolved
2018-06-05 13:10marvintmFixed in Version => RR18Q3
2018-06-05 13:10marvintmResolutionopen => fixed
2018-06-05 13:51marvintmReview Assigned To => marvintm
2018-06-05 13:51marvintmStatusresolved => closed
2019-01-14 08:15guillermogilRelationship addedrelated to 0039936

Notes
(0104108)
hgbot   
2018-04-26 16:14   
Repository: erp/pmods/org.openbravo.retail.contactinfoforproduct.synchronization
Changeset: 7f15b019a837fa270d1b94698fc33f46cd1924d4
Author: Jonathan Bueno <jonathan.bueno <at> openbravo.com>
Date: Thu Apr 26 16:13:37 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.contactinfoforproduct.synchronization/rev/7f15b019a837fa270d1b94698fc33f46cd1924d4 [^]

Fixed issue 37513: contactinfoforproduct should have an event handler to manage business partner segmentation.
Added event handler to automatically assign the store to the Business Partner assigned to the line.

---
A src/org/openbravo/retail/contactinfoforproduct/synchronization/handler/ContactInfoBusinessPartnerEventHandler.java
---
(0104682)
dmitry_mezentsev   
2018-05-24 19:11   
Ping.
"The following issue is resolved but not yet closed for 28 days."
(0104789)
marvintm   
2018-05-29 19:27   
The fix as it is implemented currently doesn't work. The logic seems to be correct, but as it is implemented as an EventHandler, it is not executed in the OrderLoader because the triggers are disabled (which also indirectly disables all EventHandlers).

The proper implementation probably should be done as an OrderLoaderHook if it is confirmed that all orders which should trigger this logic will come through the OrderLoader.
(0104938)
hgbot   
2018-06-05 13:06   
Repository: erp/pmods/org.openbravo.retail.contactinfoforproduct.synchronization
Changeset: e61df5c12ce8d1b54eb45acf571c5143e083651a
Author: Jonathan Bueno <jonathan.bueno <at> openbravo.com>
Date: Tue Jun 05 13:06:09 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.contactinfoforproduct.synchronization/rev/e61df5c12ce8d1b54eb45acf571c5143e083651a [^]

Updated issue 37513: Change logic to hook.

---
A src/org/openbravo/retail/contactinfoforproduct/synchronization/hook/ContactInfoBusinessOrderLoaderHook.java
R src/org/openbravo/retail/contactinfoforproduct/synchronization/handler/ContactInfoBusinessPartnerEventHandler.java
---