changeset 983576012164 in modules/account:6.0
details: https://hg.tryton.org/modules/account?cmd=changeset&node=983576012164
description:
Use select to True on create_date
If the index is created only in __register__ then it is dropped before
being
created again.
issue11197
review389881002
(grafted from 84e07157a0fc32fca47ff6fb52c8d7253cb6384d)
diffstat:
move.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 5b9ee9781a0f -r 983576012164 move.py
--- a/move.py Thu Feb 03 22:20:43 2022 +0100
+++ b/move.py Thu Feb 03 22:29:08 2022 +0100
@@ -87,6 +87,7 @@
@classmethod
def __setup__(cls):
super(Move, cls).__setup__()
+ cls.create_date.select = True
cls._check_modify_exclude = ['lines']
cls._order.insert(0, ('date', 'DESC'))
cls._order.insert(1, ('number', 'DESC'))
@@ -128,9 +129,6 @@
table = cls.__table_handler__(module_name)
table.index_action(['journal', 'period'], 'add')
- # Add index on create_date
- table.index_action('create_date', action='add')
-
@classmethod
def order_post_number(cls, tables):
table, _ = tables[None]