Tryton 6.8: infos tests, select removed
This commit is contained in:
parent
fc1975f0ad
commit
07b339914d
7 changed files with 19 additions and 35 deletions
|
@ -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
|
||||
|
|
14
line.py
14
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),
|
||||
|
|
3
setup.py
3
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',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=6.0.0
|
||||
version=6.8.8
|
||||
depends:
|
||||
res
|
||||
cashbook
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue