[FIX] l10n_ch_pain_base: check if partner bank is qr iban (reference_type no more set in F2)

This commit is contained in:
Thomas Winteler 2023-05-09 11:29:23 +02:00
parent ffb828337e
commit c19e530d6b

View File

@ -10,7 +10,7 @@ class AccountMoveLine(models.Model):
def _prepare_payment_line_vals(self, payment_order):
vals = super(AccountMoveLine, self)._prepare_payment_line_vals(
payment_order)
if self.move_id and self.move_id.reference_type in ['isr', 'QRR', 'SCOR']:
if self.move_id and self.move_id.partner_bank_id._is_qr_iban():
if self.move_id.reference_type == 'isr':
vals['local_instrument'] = 'CH01'
if vals['communication']: