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
This commit is contained in:
@@ -89,6 +89,7 @@ class Move(ModelSQL, ModelView):
|
||||
@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'))
|
||||
@@ -130,9 +131,6 @@ class Move(ModelSQL, ModelView):
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user