-
-
Notifications
You must be signed in to change notification settings - Fork 791
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] report_substitute: Migration to 15.0
- Loading branch information
1 parent
c0d04af
commit 41c9008
Showing
7 changed files
with
48 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** @odoo-module **/ | ||
|
||
import {registry} from "@web/core/registry"; | ||
|
||
registry | ||
.category("ir.actions.report handlers") | ||
.add("sustitution_handler", async function (action, options, env) { | ||
const orm = env.services.orm; | ||
const action_report_substitution_rule_ids = await orm.call( | ||
"ir.actions.report", | ||
"get_action_report_substitution_rule_ids", | ||
[action.id] | ||
); | ||
if ( | ||
action.type === "ir.actions.report" && | ||
action.context.active_ids && | ||
action_report_substitution_rule_ids && | ||
action_report_substitution_rule_ids.length !== 0 | ||
) { | ||
var active_ids = action.context.active_ids; | ||
const substitution = await orm.call( | ||
"ir.actions.report", | ||
"get_substitution_report_action", | ||
[action, active_ids] | ||
); | ||
Object.assign(action, substitution); | ||
} | ||
return Promise.resolve(false); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters