Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045773Retail ModulesWeb POSpublic2021-01-22 08:012021-02-01 13:55
caristu 
Retail 
highminorhave not tried
closedfixed 
5
 
RR21Q2 
No
0045773: Ability to execute action post hooks after the model hooks
There could be cases were we need to execute some logic after the execution of the model hooks and this is not possible right now. This is because model hooks are the last hooks that are executed.

So, it would be nice to have the ability of configuring action post hooks to decided whether they should be executed before or after the model hooks.
In description
No tags attached.
Issue History
2021-01-22 08:01caristuNew Issue
2021-01-22 08:01caristuAssigned To => Retail
2021-01-22 08:01caristuTriggers an Emergency Pack => No
2021-01-30 13:00hgbotNote Added: 0125895
2021-02-01 13:55hgbotResolutionopen => fixed
2021-02-01 13:55hgbotStatusnew => closed
2021-02-01 13:55hgbotNote Added: 0125919
2021-02-01 13:55hgbotFixed in Version => RR21Q2
2021-02-01 13:55hgbotNote Added: 0125920

Notes
(0125895)
hgbot   
2021-01-30 13:00   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/144 [^]
(0125919)
hgbot   
2021-02-01 13:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/144 [^]
(0125920)
hgbot   
2021-02-01 13:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: fcc0616c49d05926681a113b68c6268b3f845170
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2021-02-01T13:46:16+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/fcc0616c49d05926681a113b68c6268b3f845170 [^]

Fixes ISSUE-45773: Ability to execute action post hooks after the model hooks

This adds a new flag when registering post-hooks: isAfterModelHook
If set to true, it will execute those post-hooks after the model hooks.
By default, post-hooks will be executed before the model hooks, same
logic as before.

Some tests were added to StatePersistence and StateAPI test files.

---
M web-test/model/application-state/StateAPI.test.js
M web-test/model/application-state/StatePersistence.functional.test.js
M web/org.openbravo.mobile.core/app/model/application-state/StateAPI.js
M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
---