[FIX] account_financial_report: Refactor tests

Use core account test base, helping to ensure we have the correct accounting environment setup.
If any of the localization modules are loaded, this will make this tests be skipped, instead of simply failing

TT28423
This commit is contained in:
João Marques
2021-03-01 10:47:13 +00:00
committed by chaule97
parent 2e232d9a90
commit 6e5ea71620
6 changed files with 206 additions and 257 deletions

View File

@@ -2,12 +2,15 @@
# Copyright 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
class TestOpenItems(TransactionCase):
class TestOpenItems(AccountTestInvoicingCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
super().setUpClass(chart_template_ref=chart_template_ref)
def test_partner_filter(self):
self.env.user.company_id = self.env.ref("base.main_company").id
partner_1 = self.env.ref("base.res_partner_1")
partner_2 = self.env.ref("base.res_partner_2")
partner_3 = self.env.ref("base.res_partner_3")