diff --git a/README.rst b/README.rst index 83d5baa..53341d7 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ pip install mds-cashbook Requires ======== -- Tryton 6.0 +- Tryton 6.8 How to ====== @@ -153,6 +153,10 @@ currency are converted into the display currency of the parent cash book. Changes ======= -*6.0.0 - 05.08.2022* +*6.8.29 - 24.07.2023* + +- fix: type of indexes + +*6.8.28 - 05.06.2023* - init diff --git a/line.py b/line.py index 18cbb3e..6a202f5 100644 --- a/line.py +++ b/line.py @@ -245,7 +245,7 @@ class Line(SecondCurrencyMixin, MemCacheIndexMx, Workflow, ModelSQL, ModelView): (t.state, Index.Equality())), Index( t, - (t.reference, Index.Range())), + (t.reference, Index.Equality())), }) cls._sql_constraints.extend([ ('state_val2', diff --git a/setup.py b/setup.py index ff59617..0552dca 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 = ['python-slugify'] for dep in info.get('depends', []): @@ -89,6 +89,7 @@ setup(name='%s_%s' % (PREFIX, MODULE), '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', diff --git a/tryton.cfg b/tryton.cfg index ea57ba7..f020b81 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=6.0.0 +version=6.8.29 depends: res currency diff --git a/types.py b/types.py index 1217adf..42bb54d 100644 --- a/types.py +++ b/types.py @@ -3,7 +3,7 @@ # The COPYRIGHT file at the top level of this repository contains the # full copyright notices and license terms. -from trytond.model import ModelView, ModelSQL, fields, Unique +from trytond.model import ModelView, ModelSQL, fields, Unique, Index from trytond.transaction import Transaction from trytond.i18n import gettext @@ -30,6 +30,11 @@ class Type(ModelSQL, ModelView): cls._sql_constraints.extend([ ('code_uniq', Unique(t, t.short), 'cashbook.msg_type_short_unique'), ]) + cls._sql_indexes.update({ + Index( + t, + (t.feature, Index.Equality())), + }) @classmethod def default_feature(cls):