diff --git a/account_financial_report/tests/test_aged_partner_balance.py b/account_financial_report/tests/test_aged_partner_balance.py index b1c0e6ca..69b86806 100644 --- a/account_financial_report/tests/test_aged_partner_balance.py +++ b/account_financial_report/tests/test_aged_partner_balance.py @@ -6,9 +6,20 @@ from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, test_reports class TestAgedPartnerBalance(TransactionCase): - def setUp(self): - super().setUp() - self.wizard_model = self.env["aged.partner.balance.report.wizard"] + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env( + context=dict( + cls.env.context, + mail_create_nolog=True, + mail_create_nosubscribe=True, + mail_notrack=True, + no_reset_password=True, + tracking_disable=True, + ) + ) + cls.wizard_model = cls.env["aged.partner.balance.report.wizard"] def test_report(self): """Check that report is produced correctly.""" diff --git a/account_financial_report/tests/test_general_ledger.py b/account_financial_report/tests/test_general_ledger.py index c8a2aa70..2e9187bc 100644 --- a/account_financial_report/tests/test_general_ledger.py +++ b/account_financial_report/tests/test_general_ledger.py @@ -17,6 +17,16 @@ class TestGeneralLedgerReport(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) + cls.env = cls.env( + context=dict( + cls.env.context, + mail_create_nolog=True, + mail_create_nosubscribe=True, + mail_notrack=True, + no_reset_password=True, + tracking_disable=True, + ) + ) cls.before_previous_fy_year = fields.Date.from_string("2014-05-05") cls.previous_fy_date_start = fields.Date.from_string("2015-01-01") cls.previous_fy_date_end = fields.Date.from_string("2015-12-31") diff --git a/account_financial_report/tests/test_journal_ledger.py b/account_financial_report/tests/test_journal_ledger.py index 62b56e5e..bd343932 100644 --- a/account_financial_report/tests/test_journal_ledger.py +++ b/account_financial_report/tests/test_journal_ledger.py @@ -18,6 +18,16 @@ class TestJournalReport(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) + cls.env = cls.env( + context=dict( + cls.env.context, + mail_create_nolog=True, + mail_create_nosubscribe=True, + mail_notrack=True, + no_reset_password=True, + tracking_disable=True, + ) + ) cls.AccountObj = cls.env["account.account"] cls.InvoiceObj = cls.env["account.move"] cls.JournalObj = cls.env["account.journal"] diff --git a/account_financial_report/tests/test_open_items.py b/account_financial_report/tests/test_open_items.py index b490ca0e..532d896e 100644 --- a/account_financial_report/tests/test_open_items.py +++ b/account_financial_report/tests/test_open_items.py @@ -12,6 +12,16 @@ class TestOpenItems(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) + cls.env = cls.env( + context=dict( + cls.env.context, + mail_create_nolog=True, + mail_create_nosubscribe=True, + mail_notrack=True, + no_reset_password=True, + tracking_disable=True, + ) + ) def test_partner_filter(self): partner_1 = self.env.ref("base.res_partner_1") diff --git a/account_financial_report/tests/test_trial_balance.py b/account_financial_report/tests/test_trial_balance.py index 37d713b0..8128267b 100644 --- a/account_financial_report/tests/test_trial_balance.py +++ b/account_financial_report/tests/test_trial_balance.py @@ -13,6 +13,16 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) + cls.env = cls.env( + context=dict( + cls.env.context, + mail_create_nolog=True, + mail_create_nosubscribe=True, + mail_notrack=True, + no_reset_password=True, + tracking_disable=True, + ) + ) # Remove previous account groups and related invoices to avoid conflicts group_obj = cls.env["account.group"] cls.group1 = group_obj.create({"code_prefix_start": "1", "name": "Group 1"}) diff --git a/account_financial_report/tests/test_vat_report.py b/account_financial_report/tests/test_vat_report.py index 91776af1..04cb9a5b 100644 --- a/account_financial_report/tests/test_vat_report.py +++ b/account_financial_report/tests/test_vat_report.py @@ -49,6 +49,16 @@ class TestVATReport(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) + cls.env = cls.env( + context=dict( + cls.env.context, + mail_create_nolog=True, + mail_create_nosubscribe=True, + mail_notrack=True, + no_reset_password=True, + tracking_disable=True, + ) + ) cls.date_from = time.strftime("%Y-%m-01") cls.date_to = time.strftime("%Y-%m-28") cls.company = cls.env.user.company_id