Openbravo Issue Tracking System - POS2
View Issue Details
0046297POS2POSpublic2021-04-19 18:052021-05-01 12:06
javietxe 
cberner 
normalmajorhave not tried
closedfixed 
5
 
 
No
0046297: Posthooks using SelectCurrentSchema User-Action
In several posthooks are calling the SelectCurrentSchema user-action instead of calling the method itself.

It does that some times, depending on the configuration, the user cannot finish some actions that he has access, for example a payment.
Go to the backoffice.
Select the default role of vallblanca.
In the user-action access tab, set the SelectCurrentSchema to "Approval Required".

Log in the POS2 with vallblanca.
Create an order
Pay it.
Finish in Done-> Check that the approval is being required.
Takeaway
depends on backport 0046440TAP closed cberner Posthooks using SelectCurrentSchema User-Action 
Issue History
2021-04-19 18:05javietxeNew Issue
2021-04-19 18:05javietxeAssigned To => Retail
2021-04-19 18:05javietxeTriggers an Emergency Pack => No
2021-04-19 18:11hgbotNote Added: 0127374
2021-04-19 18:23cbernerAssigned ToRetail => cberner
2021-04-19 18:23cbernerStatusnew => scheduled
2021-04-22 23:05guilleaerTag Attached: Takeaway
2021-04-22 23:26guilleaerResolution time => 1619992800
2021-04-30 13:18cbernerStatusscheduled => acknowledged
2021-04-30 13:18cbernerStatusacknowledged => scheduled
2021-05-01 12:06hgbotNote Added: 0127704
2021-05-01 12:06hgbotResolutionopen => fixed
2021-05-01 12:06hgbotStatusscheduled => closed
2021-05-01 12:06hgbotNote Added: 0127705

Notes
(0127374)
hgbot   
2021-04-19 18:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/400 [^]
(0127704)
hgbot   
2021-05-01 12:06   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/400 [^]
(0127705)
hgbot   
2021-05-01 12:06   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 7daf23ae38a0ab4be3b71d078c49e88670435d9c
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2021-05-01T11:18:14+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/7daf23ae38a0ab4be3b71d078c49e88670435d9c [^]

Fixes ISSUE-46297: Posthooks using SelectCurrentSchema UserAction fail if approval/confirmation is required

Those posthooks will put the application in a strage state if the
approval of SelectCurrentSchema is not accepted, which should not be
required in those cases, as the Posthook is trying to select a schema
programmatically and should not follow the same flow as when a user
launches the SelectCurrentSchema user-action manually.

The fix will skip approval and confirmation in those cases.

Also, as part of this changes, this posthook that Selects the current
schema has been marked with priority 9999 to always be executed in the
last place. This way, if it fails for whatever reason, it will not block
the other posthooks. The current use case of this posthook is to change to
the main window and add product flow, as such, it should be the last
step of a those user actions.

---
M web-jspack/org.openbravo.pos2/src/model/quotation/user-actions/NewQuotation.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/CancelTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/CompleteTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/CreateCancelTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/DeleteTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/LoadLocalTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/LoadRemoteTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/NewTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/ReplaceTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/ReturnBlindTicket.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/ReturnVerifiedTicket.js
M web-jspack/org.openbravo.pos2/src/model/user-interface/user-actions/SelectCurrentSchema.js
---