From ce6af2742c509e7abcd2904e69bd3d54e700b346 Mon Sep 17 00:00:00 2001 From: Reyes4711 Date: Mon, 26 Dec 2022 08:33:24 +0100 Subject: [PATCH] [15.0][FIX] account_financial_report: generate ledger document In general ledger report shows an error due to the fact that the ball_curr varible does not generated --- account_financial_report/report/general_ledger_xlsx.py | 2 +- account_financial_report/report/templates/general_ledger.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/account_financial_report/report/general_ledger_xlsx.py b/account_financial_report/report/general_ledger_xlsx.py index 62b66b23..3c3226c6 100644 --- a/account_financial_report/report/general_ledger_xlsx.py +++ b/account_financial_report/report/general_ledger_xlsx.py @@ -154,7 +154,7 @@ class GeneralLedgerXslx(models.AbstractModel): # For each account for account in general_ledger: # Write account title - total_bal_curr = account["init_bal"]["bal_curr"] + total_bal_curr = account["init_bal"].get("bal_curr", 0) self.write_array_title( account["code"] + " - " + accounts_data[account["id"]]["name"], report_data, diff --git a/account_financial_report/report/templates/general_ledger.xml b/account_financial_report/report/templates/general_ledger.xml index 89e2b364..910a909b 100644 --- a/account_financial_report/report/templates/general_ledger.xml +++ b/account_financial_report/report/templates/general_ledger.xml @@ -371,7 +371,7 @@