From 50101b42ab9e198d42632b513b06c881bf3e3b48 Mon Sep 17 00:00:00 2001 From: eLBati Date: Tue, 21 Feb 2023 21:06:36 +0100 Subject: [PATCH] FIX reconcile_supplier_invoice setting currency to avoid redundant exchange_diff_move when not needed --- l10n_it_reverse_charge/models/account_invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/l10n_it_reverse_charge/models/account_invoice.py b/l10n_it_reverse_charge/models/account_invoice.py index d1641c39537c..ca30ee1af4db 100644 --- a/l10n_it_reverse_charge/models/account_invoice.py +++ b/l10n_it_reverse_charge/models/account_invoice.py @@ -144,7 +144,6 @@ def get_rc_inv_line_to_reconcile(self, invoice): def rc_payment_vals(self, rc_type): return { 'journal_id': rc_type.payment_journal_id.id, - # 'period_id': self.period_id.id, 'date': self.date, } @@ -211,6 +210,7 @@ def rc_debit_line_vals(self, amount=None): 'credit': credit, 'account_id': self.get_inv_line_to_reconcile().account_id.id, 'partner_id': self.partner_id.id, + 'currency_id': self.currency_id.id, } def rc_invoice_payment_vals(self, rc_type): @@ -233,6 +233,7 @@ def rc_payment_credit_line_vals(self, invoice): 'account_id': self.get_rc_inv_line_to_reconcile( invoice).account_id.id, 'partner_id': invoice.partner_id.id, + 'currency_id': invoice.currency_id.id, } def rc_payment_debit_line_vals(self, invoice, journal):