From 5f32a35498437f872e0b308e808afafd1ff37a63 Mon Sep 17 00:00:00 2001 From: josseossa <32182869+josseossa@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:47:23 -0400 Subject: [PATCH] [FIX][Sale_discount_total] _compute_amount: fix the calculation of the amount breaking any other customization on the method. The method _compute_amount was breaking any other method customization, the fix is allowing other modules to live with this. --- sale_discount_total/models/account_invoice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sale_discount_total/models/account_invoice.py b/sale_discount_total/models/account_invoice.py index 3db4746ccf..025f358eca 100644 --- a/sale_discount_total/models/account_invoice.py +++ b/sale_discount_total/models/account_invoice.py @@ -60,6 +60,11 @@ class AccountInvoice(models.Model): 'line_ids.payment_id.state', 'line_ids.full_reconcile_id') def _compute_amount(self): + try: + super(AccountInvoice, self)._compute_amount() + except NameError: + pass + for move in self: total_untaxed, total_untaxed_currency = 0.0, 0.0 total_tax, total_tax_currency = 0.0, 0.0