oca-ocb-l10n_europe/odoo-bringout-oca-ocb-l10n_ie/l10n_ie/models/account_journal.py
Ernad Husremovic 7721452493 19.0 vanilla
2026-03-09 09:31:28 +01:00

20 lines
740 B
Python

from odoo import api, models, Command
class AccountJournal(models.Model):
_inherit = 'account.journal'
@api.model
def _prepare_liquidity_account_vals(self, company, code, vals):
# OVERRIDE
account_vals = super()._prepare_liquidity_account_vals(company, code, vals)
if company.account_fiscal_country_id.code == 'IE':
# Ensure the newly created liquidity accounts have the right account tag in order to be part
# of the Irish BS and PL tags reports.
account_vals.setdefault('tag_ids', [])
account_vals['tag_ids'] += [
Command.link(self.env.ref('l10n_ie.l10n_ie_account_tag_cash_bank_hand').id),
]
return account_vals