This commit is contained in:
2026-01-26 17:32:33 +01:00
parent fbfc943301
commit 757b9f724d
5 changed files with 145 additions and 8 deletions

View File

@@ -137,6 +137,13 @@ class Currency(
closer = date
return res
@classmethod
def get_by_name(cls, name):
currencies = cls.search([('symbol', '=', name)], limit=1)
if not currencies:
return None
return currencies[0]
@staticmethod
def _get_rate(currencies, tdate=None):
'''