[FIX] account_financial_report: report_action javascript

This commit is contained in:
Henrik Norlin
2024-03-31 10:43:53 +02:00
committed by chaule97
parent 9bf114754e
commit 02fc952cdb

View File

@@ -1,40 +1,40 @@
// /** @odoo-module **/ // /** @odoo-module **/
// import {ReportAction} from "@web/webclient/actions/reports/report_action"; import {ReportAction} from "@web/webclient/actions/reports/report_action";
// import { patch } from "@web/core/utils/patch"; import {patch} from "@web/core/utils/patch";
// import {useEnrichWithActionLinks} from "./report.esm"; import {useEnrichWithActionLinks} from "./report.esm";
// const MODULE_NAME = "account_financial_report"; const MODULE_NAME = "account_financial_report";
// patch(ReportAction.prototype, "account_financial_report.ReportAction", { patch(ReportAction.prototype, {
// setup() { setup() {
// this._super.apply(this, arguments); super.setup(...arguments);
// this.isAccountFinancialReport = this.props.report_name.startsWith( this.isAccountFinancialReport = this.props.report_name.startsWith(
// `${MODULE_NAME}.` `${MODULE_NAME}.`
// ); );
// useEnrichWithActionLinks(this.iframe); useEnrichWithActionLinks(this.iframe);
// }, },
// export() { export() {
// this.action.doAction({ this.action.doAction({
// type: "ir.actions.report", type: "ir.actions.report",
// report_type: "xlsx", report_type: "xlsx",
// report_name: this._get_xlsx_name(this.props.report_name), report_name: this._get_xlsx_name(this.props.report_name),
// report_file: this._get_xlsx_name(this.props.report_file), report_file: this._get_xlsx_name(this.props.report_file),
// data: this.props.data || {}, data: this.props.data || {},
// context: this.props.context || {}, context: this.props.context || {},
// display_name: this.title, display_name: this.title,
// }); });
// }, },
// /** /**
// * @param {String} str * @param {String} str
// * @returns {String} * @returns {String}
// */ */
// _get_xlsx_name(str) { _get_xlsx_name(str) {
// if (!_.isString(str)) { if (!_.isString(str)) {
// return str; return str;
// } }
// const parts = str.split("."); const parts = str.split(".");
// return `a_f_r.report_${parts[parts.length - 1]}_xlsx`; return `a_f_r.report_${parts[parts.length - 1]}_xlsx`;
// }, },
// }); });