Skip to content

Commit

Permalink
fix: doAction in Odoo 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tardo committed May 1, 2024
1 parent 09a8a52 commit 2576c18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/page/odoo/base/do_action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ export default async function (action: string | number | {[string]: mixed}, opti
if (typeof OdooVerMajor === 'number') {
if (OdooVerMajor >= 17) {
await getOdooRoot().actionService.doAction(action, options);
return {id: action};
} else if (OdooVerMajor >= 14) {
doTrigger('do-action', {action, options});
// Simulate end of the 'action'
// FIXME: This makes me cry
await asyncSleep(1800);
return {id: action};
}
return {id: action};
}

return await new Promise((resolve, reject) => {
Expand Down

0 comments on commit 2576c18

Please sign in to comment.