From 7e651aa6fe766a5d01efed54bb4327c5b65d508c Mon Sep 17 00:00:00 2001 From: Jordi Ballester Alomar Date: Wed, 7 Nov 2018 14:57:35 +0100 Subject: [PATCH] [account_financial_report] adds the following features to Trial Balance: - Adds 'Period balance' column - Renames the option 'Hide accounts at 0'. Means no initial, no debit, credit or ending balance for the period. - Fixes logic to remove lines with 0 activity for the period. --- .../report/general_ledger.py | 6 -- .../report/templates/trial_balance.xml | 60 ++++++++++++++++++- .../report/trial_balance.py | 55 +++++++++++------ .../report/trial_balance_xlsx.py | 22 ++++--- .../wizard/trial_balance_wizard.py | 33 +++++----- .../wizard/trial_balance_wizard_view.xml | 2 +- 6 files changed, 130 insertions(+), 48 deletions(-) diff --git a/account_financial_report/report/general_ledger.py b/account_financial_report/report/general_ledger.py index 0299c55c..c86745bc 100644 --- a/account_financial_report/report/general_ledger.py +++ b/account_financial_report/report/general_ledger.py @@ -1298,8 +1298,6 @@ ORDER BY 0.0 AS final_balance FROM account_account a - INNER JOIN - account_account_type at ON a.user_type_id = at.id INNER JOIN account_move_line ml ON a.id = ml.account_id @@ -1339,12 +1337,8 @@ ORDER BY SELECT 0.0 AS initial_balance, SUM(ml.balance) AS final_balance - """ - sub_subquery_sum_amounts += """ FROM account_account a - INNER JOIN - account_account_type at ON a.user_type_id = at.id INNER JOIN account_move_line ml ON a.id = ml.account_id diff --git a/account_financial_report/report/templates/trial_balance.xml b/account_financial_report/report/templates/trial_balance.xml index 69d7ee3c..f598a6dc 100644 --- a/account_financial_report/report/templates/trial_balance.xml +++ b/account_financial_report/report/templates/trial_balance.xml @@ -35,7 +35,12 @@ - + + + + + + @@ -113,8 +118,8 @@ All entries
- Hide - Show + Hide + Show
@@ -143,6 +148,8 @@
Debit
Credit
+ +
Period balance
Ending balance
@@ -359,6 +366,38 @@ + +
+ + + + + + + + + + + + + + +
@@ -551,6 +590,21 @@
+ +
+ + + + +
- +