From 1a745c15e508e630530eac691290c32eaa348b7d Mon Sep 17 00:00:00 2001 From: sergiocorato Date: Thu, 4 Jul 2024 21:54:21 +0200 Subject: [PATCH] [14.0][FIX] l10n_it_withholding_tax dead code --- l10n_it_withholding_tax/models/account.py | 29 ++++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/l10n_it_withholding_tax/models/account.py b/l10n_it_withholding_tax/models/account.py index 7477e0696980..c168bffeae4d 100644 --- a/l10n_it_withholding_tax/models/account.py +++ b/l10n_it_withholding_tax/models/account.py @@ -257,20 +257,21 @@ def default_get(self, fields): rec["amount"] = invoice["amount_net_pay_residual"] * coeff_net return rec - def _compute_payment_amount(self, invoices=None, currency=None): - if not invoices: - invoices = self.invoice_ids - original_values = {} - for invoice in invoices: - if invoice.withholding_tax: - original_values[invoice] = invoice.residual_signed - invoice.residual_signed = invoice.amount_net_pay_residual - res = super(AccountAbstractPayment, self)._compute_payment_amount( - invoices, currency - ) - for invoice in original_values: - invoice.residual_signed = original_values[invoice] - return res + # def _compute_payment_amount(self, invoices=None, currency=None): + # # DEAD CODE + # if not invoices: + # invoices = self.invoice_ids + # original_values = {} + # for invoice in invoices: + # if invoice.withholding_tax: + # original_values[invoice] = invoice.residual_signed + # invoice.residual_signed = invoice.amount_net_pay_residual + # res = super(AccountAbstractPayment, self)._compute_payment_amount( + # invoices, currency + # ) + # for invoice in original_values: + # invoice.residual_signed = original_values[invoice] + # return res class AccountFiscalPosition(models.Model):