Skip to content
Snippets Groups Projects
Commit e7748ca3 authored by Achraf (abz)'s avatar Achraf (abz)
Browse files

[FIX] l10n_ch: Don't count foreign iban as qr_iban


When creating a bill when we specify a French account in the recipient's account we receive the following warning "Please fill in a correct ISR reference in the payment reference. The banks will refuse your payment file otherwise."

This PR adds a condition to limit the verification to Swiss accounts

opw-2581434

closes odoo/odoo#75210

X-original-commit: b0e94b24
Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
Signed-off-by: default avatarAchraf <abz-odoo@users.noreply.github.com>
parent 0268986b
Branches
Tags
No related merge requests found
......@@ -265,7 +265,8 @@ class ResPartnerBank(models.Model):
"""
self.ensure_one()
return self.acc_type == 'iban' \
return self.sanitized_acc_number.startswith('CH')\
and self.acc_type == 'iban'\
and self._check_qr_iban_range(self.sanitized_acc_number)
@api.model
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment