Openbravo Issue Tracking System - POS2
View Issue Details
0049967POS2POSpublic2022-08-08 09:242022-08-09 11:00
cberner 
Triage Platform Base 
normalmajorhave not tried
closedduplicate 
5
 
 
marvintm
No
0049967: Discounts with CRM property-conditions should be updated in the discounts cache on masterdata-refresh
Currently, CRM property conditions in the discounts cache are not updated when the masterdata refresh is executed, resulting in this changes not being shown until the user does logout/login or refresh. This is due to it being done in a on login action, when it should also be done as a after masterdata refresh action.
1. Install the org.openbravo.discounts.property-condition module and its dependencies: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition [^]
2. Setup CRM proxy:
2.1. Login backoffice and Organization window
2.2. Select Vall Blanca Store organization and activate CRM Configuration, selecting the proxy one
3. Go to Discounts window, select some discount and add a CRM Property condition in the property condition subtab, following instructions from the documentation: https://docs.google.com/document/d/1QRzn_NRYRn3kcVVR8MklxS67jDB3kPYDHI2o7CanSmk/edit [^]
4. Login WebPOS, execute masterdata refresh and check that the discount is applied to the anonymous customer (not a CRM business partner)

It is fixed if we do logout/login and do some change that affects the ticket(required to recalculate prices and discounts).
Run the discount cache update for crm property-conditions after a masterdata refresh happens.

Here: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/blob/master/web-jspack/org.openbravo.discounts.propertycondition/src/ob-init.js#L14 [^]

We could add a listener for Masterdata refresh, and when the DiscountPropertyCRMFilter changes, update the discount cache as expected.
No tags attached.
duplicate of defect 0049763 closed sntgreale The refresh data does not work well to update the promotion with CRM Property Condition 
gif loginRequiredDiscounts.gif (2,751,565) 2022-08-08 10:04
https://issues.openbravo.com/file_download.php?file_id=17389&type=bug
Issue History
2022-08-08 09:24cbernerNew Issue
2022-08-08 09:24cbernerAssigned To => cberner
2022-08-08 09:24cbernerTriggers an Emergency Pack => No
2022-08-08 09:26cbernerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24594#r24594
2022-08-08 10:03cbernerSummaryDiscounts with CRM property-conditions should not be applied when the client is not a CRM User => Discounts with CRM property-conditions should be updated in the discounts cache on masterdata-refresh
2022-08-08 10:03cbernerDescription Updatedbug_revision_view_page.php?rev_id=24596#r24596
2022-08-08 10:03cbernerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24597#r24597
2022-08-08 10:03cbernerProposed Solution updated
2022-08-08 10:03cbernerAssigned Tocberner =>
2022-08-08 10:04cbernerAssigned To => Triage Platform Base
2022-08-08 10:04cbernerFile Added: loginRequiredDiscounts.gif
2022-08-08 10:13cbernerProposed Solution updated
2022-08-09 10:02cbernerRelationship addedduplicate of 0049763
2022-08-09 11:00marvintmReview Assigned To => marvintm
2022-08-09 11:00marvintmStatusnew => closed
2022-08-09 11:00marvintmResolutionopen => duplicate

There are no notes attached to this issue.