[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) <flg@odoo.com>
This commit is contained in:
Ricardo Gomes Rodrigues (rigr)
2022-08-08 22:15:58 +02:00
parent 136c5a1f95
commit 7f6ab3d7bc
@@ -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 = [];