I am trying to add the total for each journal in the kanban view of the journals in the accounting dashboard, and this is my python file:
from odoo import fields, models, api
class AccountJournal(models.Model):
_inherit = 'account.journal'
total_usd = fields.Float(string='Total in USD', compute='_compute_total_usd', readonly=True)
def _compute_total_usd(self):
for journal in self:
total = journal.currency_id._convert(float(journal.default_account_id.current_balance), 'USD', journal.company_id, fields.Date.today())
journal.total_usd = total
and this is the view file:
" rel="ugc">ir.ui.view">
account.journal.kanban.inherit
account.journal
I am getting this error now when trying to access accounting app:
AttributeError: 'str' object has no attribute 'round'
Can somebody help please