Openbravo Issue Tracking System - POS2
View Issue Details
0049890POS2Corepublic2022-07-27 19:212022-07-29 12:05
aferraz 
aferraz 
normalmajorhave not tried
closedinvalid 
5
 
 
aferraz
No
0049890: Not possible to extend user action executability rule
Not possible to extend user action executability rule
Having a user action with a defined executability rule.
For example, IssueInvoice.js in org.openbravo.pos2.

Try to add an extra executability rule for the same user action in the ob-init.js of an external module.
For example:
Registry.getUserAction('OBPOS2_IssueTicket').addExecutabilityRule(
  () => false
);

Create a new ticket and check you can run Issue Invoice action, meaning the executability rule defined in the external module is not taken into account.
No tags attached.
blocks feature request 0049219 closed aferraz Retail Modules Gift Card as Payment Method 
png Screenshot from 2022-07-27 19-22-12.png (121,209) 2022-07-27 19:22
https://issues.openbravo.com/file_download.php?file_id=17344&type=bug
png
Issue History
2022-07-27 19:21aferrazNew Issue
2022-07-27 19:21aferrazAssigned To => Triage Platform Base
2022-07-27 19:21aferrazTriggers an Emergency Pack => No
2022-07-27 19:22aferrazFile Added: Screenshot from 2022-07-27 19-22-12.png
2022-07-27 19:22aferrazRelationship addedblocks 0049219
2022-07-28 14:27AugustoMauchAssigned ToTriage Platform Base => ablasco
2022-07-28 14:27AugustoMauchStatusnew => acknowledged
2022-07-29 12:03aferrazStatusacknowledged => scheduled
2022-07-29 12:03aferrazAssigned Toablasco => aferraz
2022-07-29 12:03aferrazStatusscheduled => feedback
2022-07-29 12:03aferrazStatusfeedback => new
2022-07-29 12:05aferrazReview Assigned To => aferraz
2022-07-29 12:05aferrazNote Added: 0139717
2022-07-29 12:05aferrazStatusnew => closed
2022-07-29 12:05aferrazResolutionopen => invalid

Notes
(0139717)
aferraz   
2022-07-29 12:05   
I was registering the executability rule in the wrong user action.
The executability rule works fine when using the correct user action.