cashbook/currency.py

35 lines
919 B
Python
Raw Normal View History

2023-02-26 21:49:21 +00:00
# -*- coding: utf-8 -*-
# This file is part of the cashbook-module from m-ds.de for Tryton.
# The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms.
2023-12-23 09:36:58 +00:00
from trytond.pool import PoolMeta
2023-02-26 21:49:21 +00:00
class CurrencyRate(metaclass=PoolMeta):
__name__ = 'currency.currency.rate'
@classmethod
def create(cls, vlist):
""" update cache-value
"""
records = super(CurrencyRate, cls).create(vlist)
2023-12-23 09:36:58 +00:00
# TODO: update cashbooks using this rate
2023-02-26 21:49:21 +00:00
return records
@classmethod
def write(cls, *args):
""" update cache-value
"""
super(CurrencyRate, cls).write(*args)
2023-12-23 09:36:58 +00:00
# TODO: update cashbooks using this rate
2023-02-26 21:49:21 +00:00
@classmethod
def delete(cls, records):
""" set cache to None
"""
super(CurrencyRate, cls).delete(records)
2023-12-23 09:36:58 +00:00
# TODO: update cashbooks using this rate
2023-02-26 21:49:21 +00:00
# end