From 8314952941e2000ce1e447f7fa26ec9a4e630258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Thu, 15 Sep 2022 12:01:52 +0200 Subject: [PATCH] [IMP] account_financial_report: Add tax_line_id field to taxes column in general_ledger TT38721 --- account_financial_report/report/general_ledger.py | 3 +++ account_financial_report/report/general_ledger_xlsx.py | 2 ++ account_financial_report/report/templates/general_ledger.xml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/account_financial_report/report/general_ledger.py b/account_financial_report/report/general_ledger.py index 1bf5b13a..bf047f47 100644 --- a/account_financial_report/report/general_ledger.py +++ b/account_financial_report/report/general_ledger.py @@ -305,6 +305,7 @@ class GeneralLedgerReport(models.AbstractModel): "ref": "" if not move_line["ref"] else move_line["ref"], "name": "" if not move_line["name"] else move_line["name"], "tax_ids": move_line["tax_ids"], + "tax_line_id": move_line["tax_line_id"], "debit": move_line["debit"], "credit": move_line["credit"], "balance": move_line["balance"], @@ -462,6 +463,7 @@ class GeneralLedgerReport(models.AbstractModel): "currency_id", "full_reconcile_id", "tax_ids", + "tax_line_id", "analytic_tag_ids", "amount_currency", "ref", @@ -716,6 +718,7 @@ class GeneralLedgerReport(models.AbstractModel): "rec_id": 0, "entry_id": False, "tax_ids": [], + "tax_line_id": False, "full_reconcile_id": False, "id": False, "tag_ids": False, diff --git a/account_financial_report/report/general_ledger_xlsx.py b/account_financial_report/report/general_ledger_xlsx.py index e4a8722c..9f39eb9f 100644 --- a/account_financial_report/report/general_ledger_xlsx.py +++ b/account_financial_report/report/general_ledger_xlsx.py @@ -193,6 +193,8 @@ class GeneralLedgerXslx(models.AbstractModel): tags = "" for tax_id in line["tax_ids"]: taxes_description += taxes_data[tax_id]["tax_name"] + " " + if line["tax_line_id"]: + taxes_description += line["tax_line_id"][1] for tag_id in line["tag_ids"]: tags += tags_data[tag_id]["name"] + " " line.update( diff --git a/account_financial_report/report/templates/general_ledger.xml b/account_financial_report/report/templates/general_ledger.xml index 5b131cda..e4879117 100644 --- a/account_financial_report/report/templates/general_ledger.xml +++ b/account_financial_report/report/templates/general_ledger.xml @@ -438,6 +438,9 @@ /> + + +