[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user