From e19fd85dc97c3e06285eab84eb421e5c80180600 Mon Sep 17 00:00:00 2001 From: Telmo Santos Date: Mon, 18 Nov 2024 09:06:32 +0100 Subject: [PATCH] [MIG] l10n_ch_qr_no_amount: Migration to version 16.0 --- l10n_ch_qr_no_amount/README.rst | 17 ++++++----------- l10n_ch_qr_no_amount/__manifest__.py | 2 +- l10n_ch_qr_no_amount/readme/CONTRIBUTORS.md | 1 + l10n_ch_qr_no_amount/readme/CREDITS.md | 2 -- .../report/swissqr_no_amount_report.py | 8 +++++++- .../report/swissqr_no_amount_report.xml | 8 ++++---- .../odoo/addons/l10n_ch_qr_no_amount | 1 + setup/l10n_ch_qr_no_amount/setup.py | 6 ++++++ 8 files changed, 26 insertions(+), 19 deletions(-) delete mode 100644 l10n_ch_qr_no_amount/readme/CREDITS.md create mode 120000 setup/l10n_ch_qr_no_amount/odoo/addons/l10n_ch_qr_no_amount create mode 100644 setup/l10n_ch_qr_no_amount/setup.py diff --git a/l10n_ch_qr_no_amount/README.rst b/l10n_ch_qr_no_amount/README.rst index 7d99f0b89..46846c6b9 100644 --- a/l10n_ch_qr_no_amount/README.rst +++ b/l10n_ch_qr_no_amount/README.rst @@ -17,13 +17,13 @@ Switzerland - No Amount QR-bill :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github - :target: https://github.com/OCA/l10n-switzerland/tree/17.0/l10n_ch_qr_no_amount + :target: https://github.com/OCA/l10n-switzerland/tree/16.0/l10n_ch_qr_no_amount :alt: OCA/l10n-switzerland .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/l10n-switzerland-17-0/l10n-switzerland-17-0-l10n_ch_qr_no_amount + :target: https://translation.odoo-community.org/projects/l10n-switzerland-16-0/l10n-switzerland-16-0-l10n_ch_qr_no_amount :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/l10n-switzerland&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-switzerland&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -56,7 +56,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. @@ -73,12 +73,7 @@ Contributors - Akim Juillerat - Son Ho - -Other credits -------------- - -The migration of this module from 13.0 to 17.0 was financially supported -by Camptocamp +- Telmo Santos Maintainers ----------- @@ -101,6 +96,6 @@ Current `maintainer `__: |maintainer-grindtildeath| -This module is part of the `OCA/l10n-switzerland `_ project on GitHub. +This module is part of the `OCA/l10n-switzerland `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_ch_qr_no_amount/__manifest__.py b/l10n_ch_qr_no_amount/__manifest__.py index 7e6e8bf09..02ded1283 100644 --- a/l10n_ch_qr_no_amount/__manifest__.py +++ b/l10n_ch_qr_no_amount/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Switzerland - No Amount QR-bill", "summary": "Allow to print QR bill without amount", - "version": "17.0.1.0.0", + "version": "16.0.1.0.0", "development_status": "Alpha", "category": "Localization", "website": "https://github.com/OCA/l10n-switzerland", diff --git a/l10n_ch_qr_no_amount/readme/CONTRIBUTORS.md b/l10n_ch_qr_no_amount/readme/CONTRIBUTORS.md index e14feb85d..9693342b8 100644 --- a/l10n_ch_qr_no_amount/readme/CONTRIBUTORS.md +++ b/l10n_ch_qr_no_amount/readme/CONTRIBUTORS.md @@ -1,2 +1,3 @@ - Akim Juillerat \<\> - Son Ho \<\> +- Telmo Santos \<\> \ No newline at end of file diff --git a/l10n_ch_qr_no_amount/readme/CREDITS.md b/l10n_ch_qr_no_amount/readme/CREDITS.md deleted file mode 100644 index 59b3719e5..000000000 --- a/l10n_ch_qr_no_amount/readme/CREDITS.md +++ /dev/null @@ -1,2 +0,0 @@ -The migration of this module from 13.0 to 17.0 was financially supported -by Camptocamp diff --git a/l10n_ch_qr_no_amount/report/swissqr_no_amount_report.py b/l10n_ch_qr_no_amount/report/swissqr_no_amount_report.py index 2718de9a4..f07d0df98 100644 --- a/l10n_ch_qr_no_amount/report/swissqr_no_amount_report.py +++ b/l10n_ch_qr_no_amount/report/swissqr_no_amount_report.py @@ -1,7 +1,13 @@ -from odoo import models +from odoo import api, models class ReportSwissNoAmountQR(models.AbstractModel): _name = "report.l10n_ch_qr_no_amount.qr_no_amount_report_main" _inherit = "report.l10n_ch.qr_report_main" _description = "QR-No-Amount-bill" + + @api.model + def _get_report_values(self, docids, data=None): + if self._name == "report.l10n_ch_qr_no_amount.qr_no_amount_report_main": + self = self.with_context(_no_amount_qr_code=True) + return super(ReportSwissNoAmountQR, self)._get_report_values(docids, data) diff --git a/l10n_ch_qr_no_amount/report/swissqr_no_amount_report.xml b/l10n_ch_qr_no_amount/report/swissqr_no_amount_report.xml index 17fa72600..2e2e16f3c 100644 --- a/l10n_ch_qr_no_amount/report/swissqr_no_amount_report.xml +++ b/l10n_ch_qr_no_amount/report/swissqr_no_amount_report.xml @@ -29,13 +29,13 @@ str() False False