Tryton 6.8: indexe neu, tests angepaßt
This commit is contained in:
parent
2cf42eb9f6
commit
2b6731d071
11 changed files with 143 additions and 52 deletions
13
mixin.py
13
mixin.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 fields
|
||||
from trytond.model import fields, Index
|
||||
from trytond.pyson import Eval, Bool, Or
|
||||
from trytond.pool import Pool
|
||||
from trytond.modules.currency.ir import rate_decimal
|
||||
|
@ -209,8 +209,15 @@ class MemCacheIndexMx:
|
|||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(MemCacheIndexMx, cls).__setup__()
|
||||
t = cls.__table__()
|
||||
# add index
|
||||
cls.write_date.select = True
|
||||
cls.create_date.select = True
|
||||
cls._sql_indexes.update({
|
||||
Index(
|
||||
t,
|
||||
(t.write_date, Index.Range())),
|
||||
Index(
|
||||
t,
|
||||
(t.create_date, Index.Range())),
|
||||
})
|
||||
|
||||
# end MemCacheIndexMx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue