book:caching for line, settings: cache clear

This commit is contained in:
Frederik Jaeckel 2023-02-27 20:46:41 +01:00
parent 2b9a2ba07a
commit 1e1e7d6b85
2 changed files with 13 additions and 1 deletions

View file

@ -21,4 +21,13 @@ class AssetSetting(ModelSingleton, ModelSQL, ModelView):
model_name='cashbook.book', ondelete='RESTRICT',
help='Profit and loss on sale of assets are recorded in the cash book.')
@classmethod
def write(cls, *args):
""" clear cache-values
"""
MemCache = Pool().get('cashbook.memcache')
MemCache._cashbook_value_cache.clear_all()
super(AssetSetting, cls).write(*args)
# end AssetSetting