From 613c590962491244c5241c4e5a64a1db6ec884b1 Mon Sep 17 00:00:00 2001 From: Bernat Brunet Date: Thu, 26 Oct 2023 10:04:33 +0200 Subject: [PATCH] In taxes by invoice report, filter the invoices and credit note from invoice related, not from invoice tax. To ensure the information showed is related the global invoice amount not the specfic tax. --- taxes_by_invoice/taxes_by_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taxes_by_invoice/taxes_by_invoice.py b/taxes_by_invoice/taxes_by_invoice.py index 48ae3a2..47ac346 100644 --- a/taxes_by_invoice/taxes_by_invoice.py +++ b/taxes_by_invoice/taxes_by_invoice.py @@ -271,9 +271,9 @@ class TaxesByInvoiceReport(HTMLReport): domain += [('invoice.party', 'in', parties)], if data['tax_type'] == 'invoiced': - domain += [('base', '>=', 0)] + domain += [('invoice.untaxed_amount', '>=', 0)] elif data['tax_type'] == 'refunded': - domain += [('base', '<', 0)] + domain += [('invoice.untaxed_amount', '<', 0)] if data['taxes']: domain += [('tax', 'in', data.get('taxes', []))]