From 981680063eae441ad34122426ee982f531c1ce57 Mon Sep 17 00:00:00 2001 From: Reyes4711 Date: Wed, 28 Dec 2022 08:17:06 +0100 Subject: [PATCH] [16.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 b0935e9d..536f2510 100644 --- a/account_financial_report/report/general_ledger_xlsx.py +++ b/account_financial_report/report/general_ledger_xlsx.py @@ -146,7 +146,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 b2487ef6..47cfeefd 100644 --- a/account_financial_report/report/templates/general_ledger.xml +++ b/account_financial_report/report/templates/general_ledger.xml @@ -365,7 +365,7 @@