The overrides in l10n_ modules are broken since 14.0 because the hook no longer exists. closes odoo/odoo#61610 X-original-commit: 1fe852e032876f2f3212a43fc3115e49f4de618d Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com> Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
22 lines
754 B
Python
22 lines
754 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, models
|
|
|
|
|
|
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.country_id.code == 'DK':
|
|
# Ensure the newly liquidity accounts have the right account tag in order to be part
|
|
# of the Danish financial reports.
|
|
account_vals.setdefault('tag_ids', [])
|
|
account_vals['tag_ids'].append((4, self.env.ref('l10n_dk.account_tag_liquidity').id))
|
|
|
|
return account_vals
|