From 7f6ab3d7bc584541620ee41bf067422d024c92cf Mon Sep 17 00:00:00 2001 From: "Ricardo Gomes Rodrigues (rigr)" Date: Fri, 5 Aug 2022 13:43:46 +0000 Subject: [PATCH] [FIX] account: fix bug when opening a misc journal entry Before this commit, opening a misc journal entry resulted in an error because we tried to compute the tax totals as if it was an invoice. This commit ignores the computation of these tax totals in case we have a misc journaly entry. opw-2946634 closes odoo/odoo#97600 Signed-off-by: Florian Gilbert (flg) --- addons/account/static/src/js/legacy_tax_totals.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/static/src/js/legacy_tax_totals.js b/addons/account/static/src/js/legacy_tax_totals.js index 8dab58d8850..32c9d4673fe 100644 --- a/addons/account/static/src/js/legacy_tax_totals.js +++ b/addons/account/static/src/js/legacy_tax_totals.js @@ -159,6 +159,8 @@ class LegacyTaxTotalsComponent extends AbstractFieldOwl { } _computeTotalsFormat() { + if (!this.totals.value) // Misc journal entry + return; let amount_untaxed = this.totals.value.amount_untaxed; let amount_tax = 0; let subtotals = [];