rates: speichert kurse

This commit is contained in:
Frederik Jaeckel 2022-11-13 22:57:40 +01:00
parent 353df93a9e
commit 42ede3decb
15 changed files with 335 additions and 12 deletions

View file

@ -30,6 +30,8 @@ class Asset(ModelSQL, ModelView):
domain=[
('category', '=', Eval('product_uom')),
], depends=['product_uom', 'product'])
rates = fields.One2Many(string='Rates', field='asset',
model_name='investment.rate')
company_currency = fields.Function(fields.Many2One(readonly=True,
string='Company Currency', states={'invisible': True},
@ -72,9 +74,9 @@ class Asset(ModelSQL, ModelView):
@classmethod
def default_currency_digits(cls):
""" default: 2
""" default: 4
"""
return 2
return 4
@fields.depends('product', 'uom')
def on_change_product(self):