From 643dc186cd8c60d95c416077d80700e3993f7108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 1 Jan 2025 19:59:35 +0100 Subject: [PATCH] Get context from default config to get chart ID to create 49ca1e40161c replace the .find call by get_id which requires a context. --- modules/account/tests/tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/account/tests/tools.py b/modules/account/tests/tools.py index 611c2f84c2..e50b54856e 100644 --- a/modules/account/tests/tools.py +++ b/modules/account/tests/tools.py @@ -5,6 +5,7 @@ import datetime from dateutil.relativedelta import relativedelta from proteus import Model, Wizard +from proteus.config import get_config from trytond.modules.company.tests.tools import get_company __all__ = ['create_fiscalyear', 'create_chart', 'get_accounts', @@ -50,6 +51,8 @@ def create_fiscalyear(company=None, today=None, config=None): def create_chart( company=None, chart='account.account_template_root_en', config=None): "Create chart of accounts" + if config is None: + config = get_config() AccountTemplate = Model.get('account.account.template', config=config) ModelData = Model.get('ir.model.data', config=config)