Skip to content

Commit

Permalink
Merge pull request #590 from OCA/15.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/reporting-engine (15.0)
  • Loading branch information
bt-admin authored Oct 25, 2023
2 parents ef27339 + cda2cd8 commit 48e59ea
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 26 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ addon | version | maintainers | summary
[report_qweb_parameter](report_qweb_parameter/) | 15.0.1.0.0 | | Add new parameters for qweb templates in order to reduce field length and check minimal length
[report_qweb_pdf_watermark](report_qweb_pdf_watermark/) | 15.0.1.0.0 | | Add watermarks to your QWEB PDF reports
[report_wkhtmltopdf_param](report_wkhtmltopdf_param/) | 15.0.1.0.0 | | Add new parameters for a paper format to be used by wkhtmltopdf command as arguments.
[report_xlsx](report_xlsx/) | 15.0.1.1.3 | | Base module to create xlsx report
[report_xlsx_helper](report_xlsx_helper/) | 15.0.1.0.1 | | Report xlsx helpers
[report_xml](report_xml/) | 15.0.1.0.1 | | Allow to generate XML reports
[report_xlsx](report_xlsx/) | 15.0.1.1.4 | | Base module to create xlsx report
[report_xlsx_helper](report_xlsx_helper/) | 15.0.1.0.2 | | Report xlsx helpers
[report_xml](report_xml/) | 15.0.1.0.2 | | Allow to generate XML reports
[sql_export](sql_export/) | 15.0.1.0.0 | | Export data in csv file with SQL requests
[sql_export_excel](sql_export_excel/) | 15.0.1.0.0 | | Allow to export a sql query to an excel file.
[sql_request_abstract](sql_request_abstract/) | 15.0.1.0.0 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | Abstract Model to manage SQL Requests
Expand Down
2 changes: 1 addition & 1 deletion report_xlsx/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Base report xlsx
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7691d7b6e1a19615d1e822b91dd4fc2717692ab1b8cd4ba14ecc1a27faba11e8
!! source digest: sha256:3931fe2fe700ff24b8a7bce1dfbaeeb6a77fb529386dd4c3e30ec81326777f5e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
Expand Down
2 changes: 1 addition & 1 deletion report_xlsx/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "ACSONE SA/NV," "Creu Blanca," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"category": "Reporting",
"version": "15.0.1.1.3",
"version": "15.0.1.1.4",
"development_status": "Mature",
"license": "AGPL-3",
"external_dependencies": {"python": ["xlsxwriter", "xlrd"]},
Expand Down
2 changes: 1 addition & 1 deletion report_xlsx/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Base report xlsx</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7691d7b6e1a19615d1e822b91dd4fc2717692ab1b8cd4ba14ecc1a27faba11e8
!! source digest: sha256:3931fe2fe700ff24b8a7bce1dfbaeeb6a77fb529386dd4c3e30ec81326777f5e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/15.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-15-0/reporting-engine-15-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&amp;target_branch=15.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>
Expand Down
25 changes: 18 additions & 7 deletions report_xlsx/tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,26 @@


class TestReport(common.TransactionCase):
def setUp(self):
super().setUp()
report_object = self.env["ir.actions.report"]
self.xlsx_report = self.env["report.report_xlsx.abstract"].with_context(
@classmethod
def setUpClass(cls):
super().setUpClass()
# Remove this variable in v16 and put instead:
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
DISABLED_MAIL_CONTEXT = {
"tracking_disable": True,
"mail_create_nolog": True,
"mail_create_nosubscribe": True,
"mail_notrack": True,
"no_reset_password": True,
}
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
report_object = cls.env["ir.actions.report"]
cls.xlsx_report = cls.env["report.report_xlsx.abstract"].with_context(
active_model="res.partner"
)
self.report_name = "report_xlsx.partner_xlsx"
self.report = report_object._get_report_from_name(self.report_name)
self.docs = self.env["res.company"].search([], limit=1).partner_id
cls.report_name = "report_xlsx.partner_xlsx"
cls.report = report_object._get_report_from_name(cls.report_name)
cls.docs = cls.env["res.company"].search([], limit=1).partner_id

def test_report(self):
report = self.report
Expand Down
2 changes: 1 addition & 1 deletion report_xlsx_helper/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Report xlsx helpers
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:abd493fc9cbcc0422f0e975a8d74f84ff6c9bbf82e37a19bb83642b3fd325fcf
!! source digest: sha256:a126fa13fe703f685cf446afe0c9533c4c653d2bbd56e1d357679d65250e4057
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
Expand Down
2 changes: 1 addition & 1 deletion report_xlsx_helper/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Noviat, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"category": "Reporting",
"version": "15.0.1.0.1",
"version": "15.0.1.0.2",
"license": "AGPL-3",
"depends": ["report_xlsx"],
"development_status": "Mature",
Expand Down
2 changes: 1 addition & 1 deletion report_xlsx_helper/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Report xlsx helpers</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:abd493fc9cbcc0422f0e975a8d74f84ff6c9bbf82e37a19bb83642b3fd325fcf
!! source digest: sha256:a126fa13fe703f685cf446afe0c9533c4c653d2bbd56e1d357679d65250e4057
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/15.0/report_xlsx_helper"><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-15-0/reporting-engine-15-0-report_xlsx_helper"><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&amp;target_branch=15.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 set of tools to facilitate the creation of excel reports with format xlsx.</p>
Expand Down
25 changes: 18 additions & 7 deletions report_xlsx_helper/tests/test_report_xlsx_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,31 @@


class TestReportXlsxHelper(TransactionCase):
def setUp(self):
super(TestReportXlsxHelper, self).setUp()
@classmethod
def setUpClass(cls):
super(TestReportXlsxHelper, cls).setUpClass()
# Remove this variable in v16 and put instead:
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
DISABLED_MAIL_CONTEXT = {
"tracking_disable": True,
"mail_create_nolog": True,
"mail_create_nosubscribe": True,
"mail_notrack": True,
"no_reset_password": True,
}
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
today = date.today()
p1 = self.env.ref("base.res_partner_1")
p2 = self.env.ref("base.res_partner_2")
p1 = cls.env.ref("base.res_partner_1")
p2 = cls.env.ref("base.res_partner_2")
p1.date = today
p2.date = today
self.partners = p1 + p2
cls.partners = p1 + p2
ctx = {
"report_name": "report_xlsx_helper.test_partner_xlsx",
"active_model": "res.partner",
"active_ids": self.partners.ids,
"active_ids": cls.partners.ids,
}
self.report = self.env["ir.actions.report"].with_context(**ctx)
cls.report = cls.env["ir.actions.report"].with_context(**ctx)

def test_report_xlsx_helper(self):
report_xls = self.report._render_xlsx(None, None)
Expand Down
2 changes: 1 addition & 1 deletion report_xml/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ XML Reports
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:da87d0036e398c3d3b1b2bac99700ee51751a35f84b56509d44abff6a727abb4
!! source digest: sha256:9cd1ff8256076157cca6d71a4913d2d5b0fea3ec858d7a4945109b1e185db5a7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
2 changes: 1 addition & 1 deletion report_xml/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
{
"name": "XML Reports",
"version": "15.0.1.0.1",
"version": "15.0.1.0.2",
"category": "Reporting",
"website": "https://github.com/OCA/reporting-engine",
"development_status": "Production/Stable",
Expand Down
2 changes: 1 addition & 1 deletion report_xml/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">XML Reports</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:da87d0036e398c3d3b1b2bac99700ee51751a35f84b56509d44abff6a727abb4
!! source digest: sha256:9cd1ff8256076157cca6d71a4913d2d5b0fea3ec858d7a4945109b1e185db5a7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/15.0/report_xml"><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-15-0/reporting-engine-15-0-report_xml"><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&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module was written to extend the functionality of the reporting engine to
Expand Down
14 changes: 14 additions & 0 deletions report_xml/tests/test_report_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@


class TestXmlReport(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
# Remove this variable in v16 and put instead:
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
DISABLED_MAIL_CONTEXT = {
"tracking_disable": True,
"mail_create_nolog": True,
"mail_create_nosubscribe": True,
"mail_notrack": True,
"no_reset_password": True,
}
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))

def test_xml(self):
report_object = self.env["ir.actions.report"]
report_name = "report_xml.demo_report_xml_view"
Expand Down

0 comments on commit 48e59ea

Please sign in to comment.