From c60246b6fcd7c2a078d3d0d8ad247390d9c64ced Mon Sep 17 00:00:00 2001 From: Alfredo Zamora Date: Mon, 22 Nov 2021 11:34:42 +0100 Subject: [PATCH] In ISR case, communication must be taken from move_id.payment_reference --- l10n_ch_pain_base/models/account_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_ch_pain_base/models/account_move_line.py b/l10n_ch_pain_base/models/account_move_line.py index 4c92f8557..117054526 100644 --- a/l10n_ch_pain_base/models/account_move_line.py +++ b/l10n_ch_pain_base/models/account_move_line.py @@ -12,10 +12,10 @@ def _prepare_payment_line_vals(self, payment_order): if self.move_id.partner_bank_id and self.move_id._has_isr_ref(): if self.move_id.partner_bank_id._is_qr_iban(): vals["communication_type"] = "qrr" - vals["communication"] = self.move_id.payment_reference else: vals["local_instrument"] = "CH01" vals["communication_type"] = "isr" + vals["communication"] = self.move_id.payment_reference if vals["communication"]: vals["communication"] = vals["communication"].replace(" ", "") return vals