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):