From 8c01fd05d8bbbc100185ce3d09908fbba17115e6 Mon Sep 17 00:00:00 2001 From: Raphael Ritter Date: Mon, 23 Aug 2021 20:26:34 +0200 Subject: [PATCH] [FIX] replaced invoice_id with move_id --- l10n_ch_pain_base/models/account_move_line.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/l10n_ch_pain_base/models/account_move_line.py b/l10n_ch_pain_base/models/account_move_line.py index f91c555..4d62b05 100644 --- a/l10n_ch_pain_base/models/account_move_line.py +++ b/l10n_ch_pain_base/models/account_move_line.py @@ -10,8 +10,8 @@ class AccountMoveLine(models.Model): def _prepare_payment_line_vals(self, payment_order): vals = super(AccountMoveLine, self)._prepare_payment_line_vals( payment_order) - if self.invoice_id and self.invoice_id.reference_type in ['isr', 'QRR', 'SCOR']: - if self.invoice_id.reference_type == 'isr': + if self.move_id and self.move_id.reference_type in ['isr', 'QRR', 'SCOR']: + if self.move_id.reference_type == 'isr': vals['local_instrument'] = 'CH01' if vals['communication']: vals['communication'] = vals['communication'].replace(' ', '')