diff --git a/account_financial_report/__manifest__.py b/account_financial_report/__manifest__.py index daff5245..65c5d31c 100644 --- a/account_financial_report/__manifest__.py +++ b/account_financial_report/__manifest__.py @@ -6,7 +6,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Account Financial Reports", - "version": "16.0.1.4.0", + "version": "17.0.1.0.0", "category": "Reporting", "summary": "OCA Financial Reports", "author": "Camptocamp SA," diff --git a/account_financial_report/report/general_ledger.py b/account_financial_report/report/general_ledger.py index 6a43719f..c8a3f5f0 100644 --- a/account_financial_report/report/general_ledger.py +++ b/account_financial_report/report/general_ledger.py @@ -209,7 +209,6 @@ class GeneralLedgerReport(models.AbstractModel): else: prt_id = gl["partner_id"][0] prt_name = gl["partner_id"][1] - prt_name = prt_name._value acc_id = gl["account_id"][0] data[acc_id][prt_id] = self._prepare_gen_ld_data_item(gl) data[acc_id][prt_id]["id"] = prt_id @@ -236,7 +235,6 @@ class GeneralLedgerReport(models.AbstractModel): if "tax_line_id" in gl and gl["tax_line_id"]: tax_id = gl["tax_line_id"][0] tax_name = gl["tax_line_id"][1] - tax_name = tax_name._value else: tax_id = 0 tax_name = "Missing Tax" diff --git a/account_financial_report/report/open_items_xlsx.py b/account_financial_report/report/open_items_xlsx.py index 2289c61a..11f23c58 100644 --- a/account_financial_report/report/open_items_xlsx.py +++ b/account_financial_report/report/open_items_xlsx.py @@ -211,6 +211,6 @@ class OpenItemsXslx(models.AbstractModel): name = my_object["code"] + " - " + my_object["name"] my_object["residual"] = total_amount[account_id]["residual"] label = _("Ending balance") - return super(OpenItemsXslx, self).write_ending_balance_from_dict( + return super().write_ending_balance_from_dict( my_object, name, label, report_data ) diff --git a/account_financial_report/report/trial_balance_xlsx.py b/account_financial_report/report/trial_balance_xlsx.py index 1f53e35a..4f950247 100644 --- a/account_financial_report/report/trial_balance_xlsx.py +++ b/account_financial_report/report/trial_balance_xlsx.py @@ -257,7 +257,7 @@ class TrialBalanceXslx(models.AbstractModel): line_object.currency_id = line_object.report_account_id.currency_id elif type_object == "account": line_object.currency_id = line_object.currency_id - return super(TrialBalanceXslx, self).write_line(line_object, report_data) + return super().write_line(line_object, report_data) def write_account_footer(self, account, name_value, report_data): """Specific function to write account footer for Trial Balance""" diff --git a/account_financial_report/static/src/js/report_action.esm.js b/account_financial_report/static/src/js/report_action.esm.js index ec7e73bd..f36a57cf 100644 --- a/account_financial_report/static/src/js/report_action.esm.js +++ b/account_financial_report/static/src/js/report_action.esm.js @@ -1,40 +1,40 @@ -/** @odoo-module **/ -import {ReportAction} from "@web/webclient/actions/reports/report_action"; -import {patch} from "web.utils"; -import {useEnrichWithActionLinks} from "./report.esm"; +// /** @odoo-module **/ +// import {ReportAction} from "@web/webclient/actions/reports/report_action"; +// import { patch } from "@web/core/utils/patch"; +// import {useEnrichWithActionLinks} from "./report.esm"; -const MODULE_NAME = "account_financial_report"; +// const MODULE_NAME = "account_financial_report"; -patch(ReportAction.prototype, "account_financial_report.ReportAction", { - setup() { - this._super.apply(this, arguments); - this.isAccountFinancialReport = this.props.report_name.startsWith( - `${MODULE_NAME}.` - ); - useEnrichWithActionLinks(this.iframe); - }, +// patch(ReportAction.prototype, "account_financial_report.ReportAction", { +// setup() { +// this._super.apply(this, arguments); +// this.isAccountFinancialReport = this.props.report_name.startsWith( +// `${MODULE_NAME}.` +// ); +// useEnrichWithActionLinks(this.iframe); +// }, - export() { - this.action.doAction({ - type: "ir.actions.report", - report_type: "xlsx", - report_name: this._get_xlsx_name(this.props.report_name), - report_file: this._get_xlsx_name(this.props.report_file), - data: this.props.data || {}, - context: this.props.context || {}, - display_name: this.title, - }); - }, +// export() { +// this.action.doAction({ +// type: "ir.actions.report", +// report_type: "xlsx", +// report_name: this._get_xlsx_name(this.props.report_name), +// report_file: this._get_xlsx_name(this.props.report_file), +// data: this.props.data || {}, +// context: this.props.context || {}, +// display_name: this.title, +// }); +// }, - /** - * @param {String} str - * @returns {String} - */ - _get_xlsx_name(str) { - if (!_.isString(str)) { - return str; - } - const parts = str.split("."); - return `a_f_r.report_${parts[parts.length - 1]}_xlsx`; - }, -}); +// /** +// * @param {String} str +// * @returns {String} +// */ +// _get_xlsx_name(str) { +// if (!_.isString(str)) { +// return str; +// } +// const parts = str.split("."); +// return `a_f_r.report_${parts[parts.length - 1]}_xlsx`; +// }, +// }); diff --git a/account_financial_report/static/src/xml/report.xml b/account_financial_report/static/src/xml/report.xml index e0099355..b369b0d1 100644 --- a/account_financial_report/static/src/xml/report.xml +++ b/account_financial_report/static/src/xml/report.xml @@ -4,7 +4,6 @@ t-name="info.ReportAction" t-inherit="web.ReportAction" t-inherit-mode="extension" - owl="1" >