diff --git a/report_xlsx/README.rst b/report_xlsx/README.rst index 66f5431ed..a2cbe1b9a 100644 --- a/report_xlsx/README.rst +++ b/report_xlsx/README.rst @@ -17,13 +17,13 @@ Base report xlsx :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github - :target: https://github.com/OCA/reporting-engine/tree/17.0/report_xlsx + :target: https://github.com/OCA/reporting-engine/tree/18.0/report_xlsx :alt: OCA/reporting-engine .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_xlsx + :target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_xlsx :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -99,7 +99,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -115,17 +115,17 @@ Authors Contributors ------------ -- Adrien Peiffer -- Sébastien Alix -- Stéphane Bidoul -- Enric Tobella -- Graeme Gellatly -- Cristian Salamea -- Rod Schouteden -- Eugene Molotov -- Christopher Ormaza -- Houzéfa Abbasbhay -- Le Dinh Tien +- Adrien Peiffer +- Sébastien Alix +- Stéphane Bidoul +- Enric Tobella +- Graeme Gellatly +- Cristian Salamea +- Rod Schouteden +- Eugene Molotov +- Christopher Ormaza +- Houzéfa Abbasbhay +- Le Dinh Tien Maintainers ----------- @@ -140,6 +140,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/reporting-engine `_ project on GitHub. +This module is part of the `OCA/reporting-engine `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/report_xlsx/__manifest__.py b/report_xlsx/__manifest__.py index 142918f1a..76b6c11e5 100644 --- a/report_xlsx/__manifest__.py +++ b/report_xlsx/__manifest__.py @@ -6,7 +6,7 @@ "author": "ACSONE SA/NV," "Creu Blanca," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/reporting-engine", "category": "Reporting", - "version": "17.0.1.0.1", + "version": "18.0.1.0.0", "development_status": "Mature", "license": "AGPL-3", "external_dependencies": {"python": ["xlsxwriter", "xlrd"]}, diff --git a/report_xlsx/models/ir_report.py b/report_xlsx/models/ir_report.py index 13484f054..bf61546f2 100644 --- a/report_xlsx/models/ir_report.py +++ b/report_xlsx/models/ir_report.py @@ -19,7 +19,7 @@ class ReportAction(models.Model): @api.model def _render_xlsx(self, report_ref, docids, data): report_sudo = self._get_report(report_ref) - report_model_name = "report.%s" % report_sudo.report_name + report_model_name = f"report.{report_sudo.report_name}" report_model = self.env[report_model_name] ret = ( report_model.with_context(active_model=report_sudo.model) diff --git a/report_xlsx/report/report_abstract_xlsx.py b/report_xlsx/report/report_abstract_xlsx.py index 1e361273f..bbad65ad1 100644 --- a/report_xlsx/report/report_abstract_xlsx.py +++ b/report_xlsx/report/report_abstract_xlsx.py @@ -95,7 +95,7 @@ class ReportXlsxAbstract(models.AbstractModel): """Get the format to be used in cells (symbol included). Used in account_financial_report addon""" s_before = currency.symbol if currency.position == "before" else "" - s_after = " %s" % currency.symbol if currency.position == "after" else "" + s_after = f" {currency.symbol}" if currency.position == "after" else "" return f"{f'{s_before}'}#,##0.{'0' * currency.decimal_places}{f'{s_after}'}" def create_xlsx_report(self, docids, data): diff --git a/report_xlsx/static/description/index.html b/report_xlsx/static/description/index.html index 1734af497..153de94f8 100644 --- a/report_xlsx/static/description/index.html +++ b/report_xlsx/static/description/index.html @@ -369,7 +369,7 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:0cdb111ad7244341d95a941ae568244595e3dd96993c951fd16992da581afb0f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Mature License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

+

Mature License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

This module provides a basic report class to generate xlsx report.

Table of contents

@@ -438,7 +438,7 @@ class PartnerXlsx(models.AbstractModel):

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -475,7 +475,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/reporting-engine project on GitHub.

+

This module is part of the OCA/reporting-engine project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/report_xlsx/static/src/js/report/action_manager_report.esm.js b/report_xlsx/static/src/js/report/action_manager_report.esm.js index 9984801a2..dd85ed84e 100644 --- a/report_xlsx/static/src/js/report/action_manager_report.esm.js +++ b/report_xlsx/static/src/js/report/action_manager_report.esm.js @@ -1,7 +1,6 @@ -/** @odoo-module **/ - import {download} from "@web/core/network/download"; import {registry} from "@web/core/registry"; +import {user} from "@web/core/user"; registry .category("ir.actions.report handlers") @@ -21,9 +20,7 @@ registry url += `/${actionContext.active_ids.join(",")}`; } if (type === "xlsx") { - const context = encodeURIComponent( - JSON.stringify(env.services.user.context) - ); + const context = encodeURIComponent(JSON.stringify(user.context)); url += `?context=${context}`; } } @@ -33,7 +30,7 @@ registry url: "/report/download", data: { data: JSON.stringify([url, action.report_type]), - context: JSON.stringify(env.services.user.context), + context: JSON.stringify(user.context), }, }); } finally {