19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:28 +01:00
parent ff721d030e
commit 7721452493
1826 changed files with 124775 additions and 274114 deletions

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
from odoo import api, Command, models
class AccountJournal(models.Model):
@ -16,6 +16,9 @@ class AccountJournal(models.Model):
# 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))
if vals.get('type') == 'bank':
account_vals['tag_ids'].append(Command.link(self.env.ref('l10n_dk.account_tag_6481').id))
elif vals.get('type') == 'cash':
account_vals['tag_ids'].append(Command.link(self.env.ref('l10n_dk.account_tag_6471').id))
return account_vals