mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] - manage substitution for mail.thread message_post_with_template
This commit is contained in:
@@ -1,27 +1,29 @@
|
||||
// Copyright 2019 ACSONE SA/NV
|
||||
// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
odoo.define('report_substitute.action_report_substitute', function(require) {
|
||||
odoo.define("report_substitute.action_report_substitute", function (require) {
|
||||
"use strict";
|
||||
|
||||
var ActionManager = require('web.ActionManager');
|
||||
var ActionManager = require("web.ActionManager");
|
||||
|
||||
ActionManager.include({
|
||||
|
||||
/**
|
||||
* Intercept action handling substitute the report action
|
||||
* @override
|
||||
*/
|
||||
_handleAction: function(action, options) {
|
||||
if (action.type === 'ir.actions.report' &&
|
||||
|
||||
_handleAction: function (action, options) {
|
||||
if (action.type === "ir.actions.report" &&
|
||||
action.context.active_ids) {
|
||||
var active_ids = action.context.active_ids;
|
||||
var self = this;
|
||||
var _super = this._super;
|
||||
var callersArguments = arguments;
|
||||
return this._rpc({
|
||||
model: 'ir.actions.report',
|
||||
method: 'get_substitution_report_dict',
|
||||
model: "ir.actions.report",
|
||||
method: "get_substitution_report_dict",
|
||||
args: [action, active_ids]
|
||||
}).then(function(action_id) {
|
||||
}).then(function (action_id) {
|
||||
callersArguments[0] = action_id
|
||||
return _super.apply(self, callersArguments);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user