Skip to content

Commit

Permalink
[MIG] l10n_ch_qr_no_amount: Migration to version 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
santostelmo committed Nov 18, 2024
1 parent 0659edc commit e19fd85
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 19 deletions.
17 changes: 6 additions & 11 deletions l10n_ch_qr_no_amount/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -56,7 +56,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/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/l10n-switzerland/issues/new?body=module:%20l10n_ch_qr_no_amount%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20l10n_ch_qr_no_amount%0Aversion:%2016.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.

Expand All @@ -73,12 +73,7 @@ Contributors

- Akim Juillerat <[email protected]>
- Son Ho <[email protected]>

Other credits
-------------

The migration of this module from 13.0 to 17.0 was financially supported
by Camptocamp
- Telmo Santos <[email protected]>

Maintainers
-----------
Expand All @@ -101,6 +96,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-grindtildeath|

This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/17.0/l10n_ch_qr_no_amount>`_ project on GitHub.
This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/16.0/l10n_ch_qr_no_amount>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion l10n_ch_qr_no_amount/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions l10n_ch_qr_no_amount/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Akim Juillerat \<<[email protected]>\>
- Son Ho \<<[email protected]>\>
- Telmo Santos \<<[email protected]>\>
2 changes: 0 additions & 2 deletions l10n_ch_qr_no_amount/readme/CREDITS.md

This file was deleted.

8 changes: 7 additions & 1 deletion l10n_ch_qr_no_amount/report/swissqr_no_amount_report.py
Original file line number Diff line number Diff line change
@@ -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)

Check warning on line 13 in l10n_ch_qr_no_amount/report/swissqr_no_amount_report.py

View check run for this annotation

Codecov / codecov/patch

l10n_ch_qr_no_amount/report/swissqr_no_amount_report.py#L12-L13

Added lines #L12 - L13 were not covered by tests
8 changes: 4 additions & 4 deletions l10n_ch_qr_no_amount/report/swissqr_no_amount_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
<attribute name="t-value">str()</attribute>
</xpath>
<xpath
expr="//div[@id='receipt_amount_zone']//span[@t-out='formated_amount']"
expr="//div[@id='receipt_amount_zone']//span[@t-esc='formated_amount']"
position="attributes"
>
<attribute name="t-if">False</attribute>
</xpath>
<xpath
expr="//div[@id='receipt_amount_zone']//span[@t-out='formated_amount']"
expr="//div[@id='receipt_amount_zone']//span[@t-esc='formated_amount']"
position="after"
>
<img
Expand All @@ -44,13 +44,13 @@
/>
</xpath>
<xpath
expr="//div[@id='amount_zone']//span[@t-out='formated_amount']"
expr="//div[@id='amount_zone']//span[@t-esc='formated_amount']"
position="attributes"
>
<attribute name="t-if">False</attribute>
</xpath>
<xpath
expr="//div[@id='amount_zone']//span[@t-out='formated_amount']"
expr="//div[@id='amount_zone']//span[@t-esc='formated_amount']"
position="after"
>
<div><img
Expand Down
6 changes: 6 additions & 0 deletions setup/l10n_ch_qr_no_amount/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit e19fd85

Please sign in to comment.