From 8bf158ea4d7b081cdaf2ca154fac92f27ca82f74 Mon Sep 17 00:00:00 2001 From: Marco Colombo Date: Fri, 15 Apr 2022 17:50:30 +0200 Subject: [PATCH] [FIX] l10n_it_fatturapa_in: fix compare between float values --- l10n_it_fatturapa_in/models/account.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py index 7224cdfc4c6f..4c3f2e578628 100644 --- a/l10n_it_fatturapa_in/models/account.py +++ b/l10n_it_fatturapa_in/models/account.py @@ -150,8 +150,12 @@ def e_inv_dati_ritenuta(self): "found. Please manually check Withholding tax Amount\n" ) if ( - sum(self.ftpa_withholding_ids.mapped("amount")) - != self.withholding_tax_amount + float_compare( + sum(self.ftpa_withholding_ids.mapped("amount")), + self.withholding_tax_amount, + precision_rounding=self.currency_id.rounding, + ) + != 0 ): error_message += _( "E-bill contains ImportoRitenuta %s but created invoice has got"