From 8e0d90afae74d31d90125f124c1386037159d089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Arturo=20Garci=CC=81a?= Date: Tue, 29 Sep 2026 09:17:37 -0400 Subject: [PATCH] Add Tryton 7.0 compatibility branch --- __init__.py | 19 +++++++++++++++++-- tests/scenario_account_do.rst | 3 ++- tests/test_module.py | 2 +- tryton.cfg | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index 81e9197..0167f75 100644 --- a/__init__.py +++ b/__init__.py @@ -1,6 +1,21 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -from . import invoice, tax +from trytond.pool import Pool -__all__ = ['invoice', 'tax'] +from . import account, invoice, ir, tax + +__all__ = ['register'] + + +def register(): + Pool.register( + ir.ModelData, + invoice.Invoice, + invoice.InvoiceLine, + tax.TaxTemplate, + tax.Tax, + module='account_do', type_='model') + Pool.register( + account.CreateChart, + module='account_do', type_='wizard') diff --git a/tests/scenario_account_do.rst b/tests/scenario_account_do.rst index ae0fb9b..e8be1bb 100644 --- a/tests/scenario_account_do.rst +++ b/tests/scenario_account_do.rst @@ -11,7 +11,8 @@ Imports:: Install account_do:: - >>> config = activate_modules('account_do', create_company) + >>> config = activate_modules('account_do') + >>> _ = create_company() Get the test company:: diff --git a/tests/test_module.py b/tests/test_module.py index 5d6bc3e..1ee9e22 100644 --- a/tests/test_module.py +++ b/tests/test_module.py @@ -621,7 +621,7 @@ class AccountDoUnitTestCase(unittest.TestCase): if line.strip() ] - self.assertEqual(config.get('tryton', 'version'), '8.0.5') + self.assertEqual(config.get('tryton', 'version'), '7.0.0') self.assertEqual( set(lines('tryton', 'depends')), {'account', 'account_invoice', 'ir'}) diff --git a/tryton.cfg b/tryton.cfg index 7fc5e93..1fba2d1 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=8.0.5 +version=7.0.0 depends: account account_invoice