Skip to content

Commit

Permalink
Merge PR #768 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 25, 2025
2 parents ad058c4 + 3617870 commit 928c59a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from odoo_test_helper import FakeModelLoader

from odoo import _, fields
from odoo.tests import common
from odoo.tests import common, tagged

_logger = logging.getLogger(__name__)

Expand All @@ -22,11 +22,20 @@
)


@tagged("post_install", "-at_install")
class TestAccountBankAccountStatementImportOnline(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()

if not cls.env.company.chart_template_id:
# Load a CoA if there's none in current company
coa = cls.env.ref("l10n_generic_coa.configurable_chart_template", False)
if not coa:
# Load the first available CoA
coa = cls.env["account.chart.template"].search(
[("visible", "=", True)], limit=1
)
coa.try_loading(company=cls.env.company, install_demo=False)
# Load fake model
cls.loader = FakeModelLoader(cls.env, cls.__module__)
cls.loader.backup_registry()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,28 @@
from dateutil.relativedelta import relativedelta

from odoo import fields
from odoo.tests import common
from odoo.tests import common, tagged

_module_ns = "odoo.addons.account_statement_import_online_gocardless"
_provider_class = (
_module_ns + ".models.online_bank_statement_provider.OnlineBankStatementProvider"
)


@tagged("post_install", "-at_install")
class TestAccountBankAccountStatementImportOnlineGocardless(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
if not cls.env.company.chart_template_id:
# Load a CoA if there's none in current company
coa = cls.env.ref("l10n_generic_coa.configurable_chart_template", False)
if not coa:
# Load the first available CoA
coa = cls.env["account.chart.template"].search(
[("visible", "=", True)], limit=1
)
coa.try_loading(company=cls.env.company, install_demo=False)
cls.now = fields.Datetime.now()
cls.currency_eur = cls.env.ref("base.EUR")
cls.currency_eur.write({"active": True})
Expand Down

0 comments on commit 928c59a

Please sign in to comment.