add worker-based precalculation of cashbook-values

This commit is contained in:
Frederik Jaeckel 2023-12-27 15:49:02 +01:00
parent 345cef4c8b
commit 65a0e0ce58
17 changed files with 1060 additions and 98 deletions

View file

@ -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, Index
from trytond.model import fields
from trytond.pyson import Eval, Bool, Or
from trytond.pool import Pool
from trytond.modules.currency.ir import rate_decimal
@ -196,25 +196,3 @@ class SecondCurrencyMixin:
return 2
# end SecondCurrencyMixin
class MemCacheIndexMx:
""" add index to 'create_date' + 'write_date'
"""
__slots__ = ()
@classmethod
def __setup__(cls):
super(MemCacheIndexMx, cls).__setup__()
t = cls.__table__()
# add index
cls._sql_indexes.update({
Index(
t,
(t.write_date, Index.Range())),
Index(
t,
(t.create_date, Index.Range())),
})
# end MemCacheIndexMx