From 3095122b97984396d12c94ac6a1526a036df9c78 Mon Sep 17 00:00:00 2001 From: josseossa <32182869+josseossa@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:16:16 -0400 Subject: [PATCH] =?UTF-8?q?[FIX][Sale=5Fdiscount=5Ftotal]=20=5Fcompute=5Fa?= =?UTF-8?q?mount:=20fix=20the=20calculation=20of=20th=E2=80=A6e=20amount?= =?UTF-8?q?=20breaking=20any=20other=20customization=20on=20the=20method.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_move.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sale_discount_total/models/account_move.py b/sale_discount_total/models/account_move.py index afa612dc7..428bdd039 100644 --- a/sale_discount_total/models/account_move.py +++ b/sale_discount_total/models/account_move.py @@ -60,6 +60,10 @@ class AccountInvoice(models.Model): 'line_ids.full_reconcile_id') def _compute_amount(self): """This function computes amount based on taxed,untaxed""" + 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