From cdca92ded63f0a7e4f7fcd04c9f8c837e7b4990e Mon Sep 17 00:00:00 2001 From: oco-odoo Date: Mon, 2 Oct 2023 14:55:36 +0000 Subject: [PATCH] [FIX] l10n_ch: allow generating SEPA QR-code for Swiss customers This commit https://github.com/odoo/odoo/commit/a9980477048e4adffda4a71a72ff1cc8490637f9 wrongly impeached to generate a SEPA QR-code on the invoice when l10n_ch was installed and the company and customer were in Switzerland. This was too restrictive, and broke the previous behavior, which allowed manually enabling the SEPA QR invoice by invoice if necessary. We restore the old behavior with this commit. OPW 3516380 closes odoo/odoo#138395 X-original-commit: d5fe06d75369716925ff65cf3f34928e890fc932 Signed-off-by: Cedric Snauwaert Signed-off-by: Olivier Colson (oco) --- addons/l10n_ch/models/res_bank.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/l10n_ch/models/res_bank.py b/addons/l10n_ch/models/res_bank.py index 1b4f0c6fdf5..c6cf26965e4 100644 --- a/addons/l10n_ch/models/res_bank.py +++ b/addons/l10n_ch/models/res_bank.py @@ -207,9 +207,6 @@ class ResPartnerBank(models.Model): error_messages.append(_("The currency isn't EUR nor CHF.")) return '\r\n'.join(error_messages) if len(error_messages) > 1 else None - if qr_method == 'sct_qr' and not _get_error_for_ch_qr(): - return _("When both parties are located in Switzerland, " - "you should use the Swiss QR code process.") if qr_method == 'ch_qr': return _get_error_for_ch_qr() return super()._get_error_messages_for_qr(qr_method, debtor_partner, currency)