[FIX] l10n_ch: allow using non-mod10r account for ISR

Remove the condition checking that the postal account field of bank accounts only accepts mod10r-verified references, as not all banks use such references (example: UBS).
This commit is contained in:
Olivier Colson
2017-11-24 15:03:58 +01:00
parent 1f74777b41
commit 09badbed98
+2 -3
View File
@@ -44,10 +44,9 @@ class ResPartnerBank(models.Model):
@api.depends('acc_number')
def _compute_l10n_ch_postal(self):
for record in self:
if record.acc_type == 'postal':
record.l10n_ch_postal = record.sanitized_acc_number
elif record.acc_type == 'iban':
if record.acc_type == 'iban':
record.l10n_ch_postal = record._retrieve_l10n_ch_postal(record.sanitized_acc_number)
record.l10n_ch_postal = record.sanitized_acc_number
def _retrieve_l10n_ch_postal(self, iban):
""" Reads a swiss postal account number from a an IBAN and returns it as