From a16498dcdb6c186ce1ec044bf35ccdc188a9909d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Wed, 12 May 2021 11:14:23 +0100 Subject: [PATCH] [FIX] account_financial_report: Fix tests Parially revert test changes in https://github.com/OCA/account-financial-reporting/pull/779/commits/ac4eef006f62ed14ec23a08bf027c1304e29fdce This is needed in contexts where a different localization and accouting configuration is loaded --- account_financial_report/tests/test_trial_balance.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/account_financial_report/tests/test_trial_balance.py b/account_financial_report/tests/test_trial_balance.py index a6ad9114..ac41dc3d 100644 --- a/account_financial_report/tests/test_trial_balance.py +++ b/account_financial_report/tests/test_trial_balance.py @@ -240,6 +240,13 @@ class TestTrialBalanceReport(common.TransactionCase): self.assertTrue(self.account200 in self.group2.compute_account_ids) def test_01_account_balance_computed(self): + # Change code of the P&L for not being automatically included + # in group 1 balances + earning_accs = self.env["account.account"].search( + [("user_type_id", "=", self.env.ref("account.data_unaffected_earnings").id)] + ) + for acc in earning_accs: + acc.code = "999" + acc.code # Generate the general ledger line res_data = self._get_report_lines() trial_balance = res_data["trial_balance"]