mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] report_xlsx: Migration to 18.0
This commit is contained in:
@@ -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 <https://github.com/OCA/reporting-engine/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 <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xlsx%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xlsx%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -115,17 +115,17 @@ Authors
|
||||
Contributors
|
||||
------------
|
||||
|
||||
- Adrien Peiffer <adrien.peiffer@acsone.eu>
|
||||
- Sébastien Alix <sebastien.alix@osiell.com>
|
||||
- Stéphane Bidoul <stephane.bidoul@acsone.eu>
|
||||
- Enric Tobella <etobella@creublanca.es>
|
||||
- Graeme Gellatly <gdgellatly@gmail.com>
|
||||
- Cristian Salamea <cs@prisehub.com>
|
||||
- Rod Schouteden <rod.schouteden@dynapps.be>
|
||||
- Eugene Molotov <molotov@it-projects.info>
|
||||
- Christopher Ormaza <chris.ormaza@forgeflow.com>
|
||||
- Houzéfa Abbasbhay <houzefa.abba@xcg-consulting.fr>
|
||||
- Le Dinh Tien <tien-ld@komit-consulting.com>
|
||||
- Adrien Peiffer <adrien.peiffer@acsone.eu>
|
||||
- Sébastien Alix <sebastien.alix@osiell.com>
|
||||
- Stéphane Bidoul <stephane.bidoul@acsone.eu>
|
||||
- Enric Tobella <etobella@creublanca.es>
|
||||
- Graeme Gellatly <gdgellatly@gmail.com>
|
||||
- Cristian Salamea <cs@prisehub.com>
|
||||
- Rod Schouteden <rod.schouteden@dynapps.be>
|
||||
- Eugene Molotov <molotov@it-projects.info>
|
||||
- Christopher Ormaza <chris.ormaza@forgeflow.com>
|
||||
- Houzéfa Abbasbhay <houzefa.abba@xcg-consulting.fr>
|
||||
- Le Dinh Tien <tien-ld@komit-consulting.com>
|
||||
|
||||
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 <https://github.com/OCA/reporting-engine/tree/17.0/report_xlsx>`_ project on GitHub.
|
||||
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/18.0/report_xlsx>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -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"]},
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -369,7 +369,7 @@ ul.auto-toc {
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:0cdb111ad7244341d95a941ae568244595e3dd96993c951fd16992da581afb0f
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/17.0/report_xlsx"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_xlsx"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/18.0/report_xlsx"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_xlsx"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module provides a basic report class to generate xlsx report.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
@@ -438,7 +438,7 @@ class PartnerXlsx(models.AbstractModel):
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xlsx%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xlsx%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -475,7 +475,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/17.0/report_xlsx">OCA/reporting-engine</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/18.0/report_xlsx">OCA/reporting-engine</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user