From 5c8321a031d772a8e6209238e2d3bdf9612b04eb Mon Sep 17 00:00:00 2001 From: Sander Lienaerts Date: Fri, 12 Jan 2024 15:37:55 +0100 Subject: [PATCH] [MIG] report_qweb_pdf_watermark: Migration to 17.0 --- report_qweb_pdf_watermark/README.rst | 6 ++++ report_qweb_pdf_watermark/__manifest__.py | 3 +- report_qweb_pdf_watermark/models/report.py | 15 +++++----- .../readme/CONTRIBUTORS.md | 1 + report_qweb_pdf_watermark/readme/HISTORY.md | 4 +++ .../static/description/index.html | 28 ++++++++++++------- .../views/ir_actions_report_xml.xml | 6 ++-- 7 files changed, 41 insertions(+), 22 deletions(-) diff --git a/report_qweb_pdf_watermark/README.rst b/report_qweb_pdf_watermark/README.rst index f2a13ac7f..a44a4786a 100644 --- a/report_qweb_pdf_watermark/README.rst +++ b/report_qweb_pdf_watermark/README.rst @@ -111,6 +111,11 @@ Changelog - [MIG] Migration to V16. +17.0.1.0.0 (2024-01-12) +----------------------- + +- [MIG] Migration to V17. + Bug Tracker =========== @@ -138,6 +143,7 @@ Contributors - Robin Goots - Foram Shah - Emiel van Bokhoven +- Sander Lienaerts - Anjeel Haria Maintainers diff --git a/report_qweb_pdf_watermark/__manifest__.py b/report_qweb_pdf_watermark/__manifest__.py index 26b350f8d..4c40df09d 100644 --- a/report_qweb_pdf_watermark/__manifest__.py +++ b/report_qweb_pdf_watermark/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Pdf watermark", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "author": "Therp BV, " "Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Technical Settings", @@ -11,7 +11,6 @@ "website": "https://github.com/OCA/reporting-engine", "depends": ["web"], "data": [ - "demo/report.xml", "views/ir_actions_report_xml.xml", "views/res_company.xml", ], diff --git a/report_qweb_pdf_watermark/models/report.py b/report_qweb_pdf_watermark/models/report.py index b48516933..40ecd027c 100644 --- a/report_qweb_pdf_watermark/models/report.py +++ b/report_qweb_pdf_watermark/models/report.py @@ -44,14 +44,15 @@ class Report(models.Model): def _render_qweb_pdf(self, report_ref, res_ids=None, data=None): if not self.env.context.get("res_ids"): - return super(Report, self.with_context(res_ids=res_ids))._render_qweb_pdf( - report_ref, res_ids=res_ids, data=data + return ( + super() + .with_context(res_ids=res_ids) + ._render_qweb_pdf(report_ref, res_ids=res_ids, data=data) ) - return super(Report, self)._render_qweb_pdf( - report_ref, res_ids=res_ids, data=data - ) + return super()._render_qweb_pdf(report_ref, res_ids=res_ids, data=data) - def pdf_has_usable_pages(self, numpages): + @staticmethod + def pdf_has_usable_pages(numpages): if numpages < 1: logger.error("Your watermark pdf does not contain any pages") return False @@ -73,7 +74,7 @@ class Report(models.Model): specific_paperformat_args=None, set_viewport_size=False, ): - result = super(Report, self)._run_wkhtmltopdf( + result = super()._run_wkhtmltopdf( bodies, report_ref=report_ref, header=header, diff --git a/report_qweb_pdf_watermark/readme/CONTRIBUTORS.md b/report_qweb_pdf_watermark/readme/CONTRIBUTORS.md index ad0c79fb3..86a50f5c5 100644 --- a/report_qweb_pdf_watermark/readme/CONTRIBUTORS.md +++ b/report_qweb_pdf_watermark/readme/CONTRIBUTORS.md @@ -4,4 +4,5 @@ - Robin Goots \<\> - Foram Shah \<\> - Emiel van Bokhoven \<\> +- Sander Lienaerts \<\> - Anjeel Haria diff --git a/report_qweb_pdf_watermark/readme/HISTORY.md b/report_qweb_pdf_watermark/readme/HISTORY.md index 7134b9d02..cd00602e5 100644 --- a/report_qweb_pdf_watermark/readme/HISTORY.md +++ b/report_qweb_pdf_watermark/readme/HISTORY.md @@ -18,3 +18,7 @@ ## 16.0.1.0.0 (2023-03-13) - \[MIG\] Migration to V16. + +## 17.0.1.0.0 (2024-01-12) + +- \[MIG\] Migration to V17. diff --git a/report_qweb_pdf_watermark/static/description/index.html b/report_qweb_pdf_watermark/static/description/index.html index bd1652870..344f88d24 100644 --- a/report_qweb_pdf_watermark/static/description/index.html +++ b/report_qweb_pdf_watermark/static/description/index.html @@ -387,13 +387,14 @@ image at the PDF level.

  • 14.0.1.0.0 (2021-01-29)
  • 15.0.1.0.0 (2022-01-11)
  • 16.0.1.0.0 (2023-03-13)
  • +
  • 17.0.1.0.0 (2024-01-12)
  • -
  • Bug Tracker
  • -
  • Credits @@ -471,9 +472,15 @@ reported to work with Wkhtmltopdf 0.12.4.

  • [MIG] Migration to V16.
  • +
    +

    17.0.1.0.0 (2024-01-12)

    +
      +
    • [MIG] Migration to V17.
    • +
    +
    -

    Bug Tracker

    +

    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 @@ -481,15 +488,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Therp BV
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association

    OCA, or the Odoo Community Association, is a nonprofit organization whose diff --git a/report_qweb_pdf_watermark/views/ir_actions_report_xml.xml b/report_qweb_pdf_watermark/views/ir_actions_report_xml.xml index 98b493f2b..5b9cdd3c3 100644 --- a/report_qweb_pdf_watermark/views/ir_actions_report_xml.xml +++ b/report_qweb_pdf_watermark/views/ir_actions_report_xml.xml @@ -7,16 +7,16 @@