Openbravo Issue Tracking System - Retail Modules
View Issue Details
0052085Retail ModulesRetail APIpublic2023-04-07 13:292023-04-26 07:11
azzeddine_meftoh 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
RR23Q3 
approved
marvintm
Gold
61963
No
0052085: RETAPCO_OrderCreation generated on POS wrongly
when we have the push ticket event activated we are facing some cases where the same ticket is sent multiple times :

on React POS : Open an existing ticket on POS + review payment + done an event RETAPCO_OrderCreation is triggered wrongly
this event should be triggered only when creating the sales order

opening an existing ticket on POS + review payment + done

-> the event is triggered
The proposed solution that we are going to implement is the following:
- We will create two new events, "Web POS Order Update", and "External Order Update"
- We will ensure that the proper event is called from the OrderLoader, depending on whether the order already existed and is being changed in some way, or we are creating a new order that previously did not exist in the system.

For customers that need to receive both creation and update requests in a single endpoint, this will still be possible: you will need to subscribe to both events, pointing them to the same endpoint in the external system, and then you can check the "meta" property in the request to differentiate creations from updates:

  "meta": {
    "event": "RETAPCO_OrderCreation",
    "entity": "Order",
    "isMultiRecord": false
  }
No tags attached.
Issue History
2023-04-07 13:29azzeddine_meftohNew Issue
2023-04-07 13:29azzeddine_meftohAssigned To => Triage Platform Conn
2023-04-07 13:29azzeddine_meftohTriggers an Emergency Pack => No
2023-04-10 13:22ivazquezOBNetwork customer => Gold
2023-04-10 13:22ivazquezSupport ticket => 61963
2023-04-11 15:13marvintmAssigned ToTriage Platform Conn => Retail
2023-04-11 15:21psanjuanNote Added: 0148362
2023-04-11 15:21psanjuanAssigned ToRetail => psanjuan
2023-04-11 15:22psanjuanAssigned Topsanjuan => azzeddine_meftoh
2023-04-11 15:22psanjuanStatusnew => feedback
2023-04-17 11:15marvintmAssigned Toazzeddine_meftoh => ranjith_qualiantech_com
2023-04-17 11:18marvintmProposed Solution updated
2023-04-17 11:18marvintmStatusfeedback => scheduled
2023-04-18 06:34hgbotMerge Request Status => open
2023-04-18 06:34hgbotNote Added: 0148521
2023-04-21 12:29hgbotMerge Request Statusopen => approved
2023-04-21 12:29hgbotResolutionopen => fixed
2023-04-21 12:29hgbotStatusscheduled => closed
2023-04-21 12:29hgbotNote Added: 0148720
2023-04-21 12:29hgbotNote Added: 0148721
2023-04-26 07:10marvintmStatusclosed => resolved
2023-04-26 07:10marvintmFixed in Version => RR23Q3
2023-04-26 07:10marvintmReview Assigned To => marvintm
2023-04-26 07:10marvintmStatusresolved => closed
2023-04-26 07:11ranjith_qualiantech_comNote Added: 0148879

Notes
(0148362)
psanjuan   
2023-04-11 15:21   
Hello Azzeddine,
Currently, we do have only one event for the first sent and later on update of an order.
In fact, we are planning to rename such event so it clearly remarks that this event is the one to launch to create/update an order.

See also our comments on the JIRA RM-1715, which also implies the modification/update of an existing and already sent order.

We can not consider this as a bug, as it is design in such way, otherwise we will have to create more events that should be properly defined.
So far, we do not see any benefit on creating two events, one for the creation and another one for the updated, because at the end we are sending the same information.

Please let us know your feedback. Thanks.
(0148521)
hgbot   
2023-04-18 06:34   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/66 [^]
(0148720)
hgbot   
2023-04-21 12:29   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api [^]
Changeset: b48ece31cdb8edbf37c25b26f3577149221d195f
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 17-04-2023 16:51:27
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/commit/b48ece31cdb8edbf37c25b26f3577149221d195f [^]

Fixed ISSUE-52085: Added BusinessApiEvent for Order Update & EOL Update

---
M src-db/database/sourcedata/CNC_PUBLIC_EVENTS.xml
M src/org/openbravo/retail/api/events/order/OrderLoaderEventsHook.java
---
(0148721)
hgbot   
2023-04-21 12:29   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/66 [^]
(0148879)
ranjith_qualiantech_com   
2023-04-26 07:11   
Updated Wiki http://wiki.openbravo.com/wiki/Push_API#Standard_Business_API_Events [^]