From 1e1bf2a301a7bd839ffcfff5d014f460a34a4bf0 Mon Sep 17 00:00:00 2001 From: Benjamin Willig Date: Mon, 30 Oct 2017 07:54:27 +0100 Subject: [PATCH] [CHG] Use tax description if it exists. Removed useless when condition --- .../report/general_ledger.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/account_financial_report_qweb/report/general_ledger.py b/account_financial_report_qweb/report/general_ledger.py index 560b6d89..010b0d7b 100644 --- a/account_financial_report_qweb/report/general_ledger.py +++ b/account_financial_report_qweb/report/general_ledger.py @@ -896,15 +896,14 @@ SELECT WHEN ml.tax_line_id is not null THEN - at.name + COALESCE(at.description, at.name) WHEN - (SELECT count(*) - FROM account_move_line_account_tax_rel aml_at_rel - WHERE aml_at_rel.account_move_line_id = ml.id - LIMIT 1) > 0 + ml.tax_line_id is null THEN (SELECT - array_to_string(array_agg(at.name), ', ') + array_to_string( + array_agg(COALESCE(at.description, at.name) + ), ', ') FROM account_move_line_account_tax_rel aml_at_rel LEFT JOIN