I would like to include a related field from res.currency in a ORM model, but can't find any information how to deal with decimal precision in ORM.
exchange_rate = fields.Float('res.currency.rate',
'Exchange Rate', related='currency_id.rate', readonly=True)
When I open a view with the fields I get this error:
File "/opt/odoo/odoo-server/openerp/tools/float_utils.py", line 29, in _float_check_precision
return 10 ** -precision_digits
TypeError: bad operand type for unary -: 'str'
Would be glad to know a workaround to solve this problem.