From 9177edf82a68652b0e6c137712cd37161146812f Mon Sep 17 00:00:00 2001 From: Lara Baggio Date: Tue, 14 May 2019 18:09:47 +0200 Subject: [PATCH] fix check value param self.hierarchy for account grouping --- account_financial_report/report/trial_balance.py | 2 +- account_financial_report/tests/test_trial_balance.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/account_financial_report/report/trial_balance.py b/account_financial_report/report/trial_balance.py index 8e81dced..c668127a 100644 --- a/account_financial_report/report/trial_balance.py +++ b/account_financial_report/report/trial_balance.py @@ -572,7 +572,7 @@ WHERE newline.account_group_id = report_trial_balance_account.parent_id groups = self.account_ids.filtered( lambda a: a.account_group_id is not False) for group in groups: - if self.hierarchy_on == 'compute': + if self.hierarchy_on == 'computed': group.compute_account_ids = \ group.account_group_id.compute_account_ids else: diff --git a/account_financial_report/tests/test_trial_balance.py b/account_financial_report/tests/test_trial_balance.py index 0435c81c..90b66422 100644 --- a/account_financial_report/tests/test_trial_balance.py +++ b/account_financial_report/tests/test_trial_balance.py @@ -326,7 +326,7 @@ class TestTrialBalanceReport(common.TransactionCase): self.assertEqual(lines['group2'].debit, 2000) self.assertEqual(lines['group2'].credit, 0) self.assertEqual(lines['group2'].final_balance, 2000) - self.assertEqual(len(lines['group2'].compute_account_ids), 2) + self.assertEqual(len(lines['group2'].compute_account_ids), 9) def test_02_account_balance_hierarchy(self): # Generate the general ledger line