diff --git a/README.rst b/README.rst index 6a3e8a4..f197171 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ pip install mds-cashbook-report Requires ======== -- Tryton 6.0 +- Tryton 6.8 Info ==== @@ -29,6 +29,7 @@ so that you can display several evaluations at the same time. Changes ======= -*6.0.0 - 28.10.2022* +*6.8.8 - 16.06.2023* + +- compatibility to Tryton 6.8 -- init diff --git a/line.py b/line.py index d4e4ab4..c266820 100644 --- a/line.py +++ b/line.py @@ -19,29 +19,25 @@ class EvaluationLine(ModelSQL, ModelView): __name__ = 'cashbook_report.eval_line' evaluation = fields.Many2One( - string='Evaluation', required=True, - select=True, ondelete='CASCADE', + string='Evaluation', required=True, ondelete='CASCADE', model_name='cashbook_report.evaluation') cashbook = fields.Many2One( - string='Cashbook', select=True, ondelete='CASCADE', - model_name='cashbook.book', + string='Cashbook', ondelete='CASCADE', model_name='cashbook.book', states={ 'required': Eval('eval_dtype', '').in_(cashbook_types), }, depends=['eval_dtype']) dtype = fields.Many2One( - string='Type', select=True, ondelete='CASCADE', - model_name='cashbook.type', + string='Type', ondelete='CASCADE', model_name='cashbook.type', states={ 'required': Eval('eval_dtype', '').in_(booktype_types), }, depends=['eval_dtype']) currency = fields.Many2One( - string='Currency', select=True, ondelete='CASCADE', - model_name='currency.currency', + string='Currency', ondelete='CASCADE', model_name='currency.currency', states={ 'required': Eval('eval_dtype', '') == 'currencies', }, depends=['eval_dtype']) category = fields.Many2One( - string='Category', select=True, ondelete='CASCADE', + string='Category', ondelete='CASCADE', model_name='cashbook.bookcategory', states={ 'required': Eval('eval_dtype', '').in_(category_types), diff --git a/setup.py b/setup.py index f77e4eb..b2bd2ec 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ with open(path.join(here, 'versiondep.txt'), encoding='utf-8') as f: # tryton-version major_version = 6 -minor_version = 0 +minor_version = 8 requires = [] for dep in info.get('depends', []): @@ -91,6 +91,7 @@ setup( 'License :: OSI Approved :: GNU General Public License (GPL)', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], keywords='tryton cashbook report', diff --git a/tests/__init__.py b/tests/__init__.py index 5180a5b..cf7e957 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -2,17 +2,3 @@ # This file is part of the cashbook-module from m-ds for Tryton. # The COPYRIGHT file at the top level of this repository contains the # full copyright notices and license terms. - -import trytond.tests.test_tryton -import unittest - -from trytond.modules.cashbook_report.tests.test_report import ReportTestCase - - -__all__ = ['suite'] - - -def suite(): - suite = trytond.tests.test_tryton.suite() - suite.addTests(unittest.TestLoader().loadTestsFromTestCase(ReportTestCase)) - return suite diff --git a/tests/test_report.py b/tests/test_report.py index 463e933..a9b0f7f 100644 --- a/tests/test_report.py +++ b/tests/test_report.py @@ -7,7 +7,7 @@ from trytond.tests.test_tryton import with_transaction, activate_module from trytond.pool import Pool from trytond.transaction import Transaction from trytond.exceptions import UserError -from trytond.modules.cashbook_investment.tests import \ +from trytond.modules.cashbook_investment.tests.test_module import \ CashbookInvestmentTestCase from datetime import date from decimal import Decimal @@ -705,8 +705,8 @@ class ReportTestCase(CashbookInvestmentTestCase): # must fail self.assertRaisesRegex( UserError, - 'A value is required for field "Data type" in ' + - '"Evaluation Line Relation".', + 'A value is required for field "Data type" in "None" ' + + 'of "Evaluation Line Relation".', Evaluation.create, [{ 'name': 'Evaluation 1', @@ -723,8 +723,8 @@ class ReportTestCase(CashbookInvestmentTestCase): # must fail self.assertRaisesRegex( UserError, - 'A value is required for field "Cashbook" in ' + - '"Evaluation Line Relation".', + 'A value is required for field "Cashbook" in "None" ' + + 'of "Evaluation Line Relation".', Evaluation.create, [{ 'name': 'Evaluation 3', diff --git a/tryton.cfg b/tryton.cfg index 4d73694..4cd93b9 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=6.0.0 +version=6.8.8 depends: res cashbook diff --git a/versiondep.txt b/versiondep.txt index 4605d4c..2ac9efb 100644 --- a/versiondep.txt +++ b/versiondep.txt @@ -1,2 +1,2 @@ -cashbook;6.0.19;6.0.999;mds -cashbook_bookcategory;6.0.2;6.0.999;mds +cashbook;6.8.28;6.8.999;mds +cashbook_bookcategory;6.8.4;6.8.999;mds