diff --git a/account_financial_report/report/general_ledger_xlsx.py b/account_financial_report/report/general_ledger_xlsx.py index bb8b8429..62b66b23 100644 --- a/account_financial_report/report/general_ledger_xlsx.py +++ b/account_financial_report/report/general_ledger_xlsx.py @@ -84,7 +84,9 @@ class GeneralLedgerXslx(models.AbstractModel): { "header": _("Cumul cur."), "field": "total_bal_curr", - "type": "amount_different_company_currency", + "field_initial_balance": "initial_bal_curr", + "field_final_balance": "final_bal_curr", + "type": "amount_currency", "width": 10, }, ] @@ -152,6 +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"] self.write_array_title( account["code"] + " - " + accounts_data[account["id"]]["name"], report_data, @@ -176,7 +179,6 @@ class GeneralLedgerXslx(models.AbstractModel): self.write_initial_balance_from_dict(account, report_data) # Display account move lines - total_bal_curr = 0 for line in account["move_lines"]: line.update( { @@ -233,6 +235,7 @@ class GeneralLedgerXslx(models.AbstractModel): else: # For each partner + total_bal_curr = account["init_bal"]["bal_curr"] for group_item in account["list_grouped"]: # Write partner title self.write_array_title(group_item["name"], report_data) @@ -262,7 +265,6 @@ class GeneralLedgerXslx(models.AbstractModel): self.write_initial_balance_from_dict(group_item, report_data) # Display account move lines - total_bal_curr = 0 for line in group_item["move_lines"]: line.update( { diff --git a/account_financial_report/report/templates/general_ledger.xml b/account_financial_report/report/templates/general_ledger.xml index 3419615d..bc7710ad 100644 --- a/account_financial_report/report/templates/general_ledger.xml +++ b/account_financial_report/report/templates/general_ledger.xml @@ -335,7 +335,30 @@ -
+