changeset f5ae77427e39 in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset&node=f5ae77427e39
description:
        Always use proteus config argument in testing tools

        issue10548
        review338421002
diffstat:

 tests/tools.py |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (55 lines):

diff -r 7b2b1e3d5160 -r f5ae77427e39 tests/tools.py
--- a/tests/tools.py    Sun Jul 04 17:54:45 2021 +0200
+++ b/tests/tools.py    Mon Jul 12 22:56:26 2021 +0200
@@ -19,7 +19,7 @@
     SequenceType = Model.get('ir.sequence.type', config=config)
 
     if not company:
-        company = get_company()
+        company = get_company(config=config)
 
     if not today:
         today = datetime.date.today()
@@ -44,10 +44,10 @@
         company=None, chart='account.account_template_root_en', config=None):
     "Create chart of accounts"
     AccountTemplate = Model.get('account.account.template', config=config)
-    ModelData = Model.get('ir.model.data')
+    ModelData = Model.get('ir.model.data', config=config)
 
     if not company:
-        company = get_company()
+        company = get_company(config=config)
 
     module, xml_id = chart.split('.')
     data, = ModelData.find([
@@ -57,7 +57,7 @@
 
     account_template = AccountTemplate(data.db_id)
 
-    create_chart = Wizard('account.create_chart')
+    create_chart = Wizard('account.create_chart', config=config)
     create_chart.execute('account')
     create_chart.form.account_template = account_template
     create_chart.form.company = company
@@ -78,7 +78,7 @@
     Account = Model.get('account.account', config=config)
 
     if not company:
-        company = get_company()
+        company = get_company(config=config)
 
     accounts = {}
     for type in ['receivable', 'payable', 'revenue', 'expense']:
@@ -111,9 +111,9 @@
     Tax = Model.get('account.tax', config=config)
 
     if not company:
-        company = get_company()
+        company = get_company(config=config)
 
-    accounts = get_accounts(company)
+    accounts = get_accounts(company, config=config)
 
     tax = Tax()
     tax.name = 'Tax %s' % rate

Reply via email to