From 4bd43fcbd7a21142cf9bbf6bdd158afbb7af200d 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 05953717..3953a0d1 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 b182850f..6b5f3656 100644 --- a/account_financial_report/report/general_ledger_xlsx.py +++ b/account_financial_report/report/general_ledger_xlsx.py @@ -197,6 +197,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 1ca2c8a6..00e24616 100644 --- a/account_financial_report/report/templates/general_ledger.xml +++ b/account_financial_report/report/templates/general_ledger.xml @@ -445,6 +445,9 @@ /> + + +