[IMP] web: add afterExecuteAction to view_button_hook
The function will be called after the action has been executed. X-original-commit: 1e4c6e457a9c42da76c647ca0972b06e6d838349 Part-of: odoo/odoo#101310
This commit is contained in:
@@ -39,6 +39,9 @@ export function useViewButtons(model, ref, options = {}) {
|
||||
(() => {
|
||||
return true;
|
||||
});
|
||||
const afterExecuteAction =
|
||||
options.afterExecuteAction ||
|
||||
(() => {});
|
||||
useSubEnv({
|
||||
async onClickViewButton({
|
||||
clickParams,
|
||||
@@ -97,6 +100,7 @@ export function useViewButtons(model, ref, options = {}) {
|
||||
error = _e;
|
||||
await doActionParams.onClose();
|
||||
}
|
||||
await afterExecuteAction(clickParams);
|
||||
enableButtons(getEl(), manuallyDisabledButtons, enableAction);
|
||||
if (error) {
|
||||
return Promise.reject(error);
|
||||
|
||||
Reference in New Issue
Block a user