From dc2d455bd0022df694fc399f976d7d09d0f71e76 Mon Sep 17 00:00:00 2001 From: matteoopenf Date: Mon, 18 Sep 2023 10:27:13 +0200 Subject: [PATCH] [FIX][l10n_it_reverse_charge] fix case there is a line with abbuoni ref issue https://github.com/OCA/l10n-italy/issues/3581 [FIX][l10n_it_reverse_charge] fix case there is a line with abbuoni ref issue https://github.com/OCA/l10n-italy/issues/3581 --- l10n_it_reverse_charge/__manifest__.py | 1 + l10n_it_reverse_charge/models/account_move.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/l10n_it_reverse_charge/__manifest__.py b/l10n_it_reverse_charge/__manifest__.py index dd7a65aadc80..23693358fd5c 100644 --- a/l10n_it_reverse_charge/__manifest__.py +++ b/l10n_it_reverse_charge/__manifest__.py @@ -3,6 +3,7 @@ # Copyright 2017 Lorenzo Battistini - Agile Business Group # Copyright 2017 Marco Calcagni - Dinamiche Aziendali srl # Copyright 2023 Simone Rubino - TAKOBI +# Copyright 2023 Matteo Mircoli - Openforce srls # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpg). { diff --git a/l10n_it_reverse_charge/models/account_move.py b/l10n_it_reverse_charge/models/account_move.py index 9cfae56ffbe0..daa246ab060d 100644 --- a/l10n_it_reverse_charge/models/account_move.py +++ b/l10n_it_reverse_charge/models/account_move.py @@ -139,7 +139,10 @@ def _rc_get_move_line_to_reconcile(self): is_zero = self.currency_id.is_zero for move_line in self.line_ids: field_value = getattr(move_line, line_field) - if not is_zero(field_value): + if not is_zero(field_value) and move_line.account_internal_type in ( + "receivable", + "payable", + ): break else: raise UserError(