| 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | from odoo import api, fields, models, _ |
| 4 | |
| 5 | |
| 6 | class AccountJournal(models.Model): |
| 7 | _inherit = 'account.journal' |
| 8 | |
| 9 | @api.model |
| 10 | def _prepare_liquidity_account_vals(self, company, code, vals): |
| 11 | # OVERRIDE |
| 12 | account_vals = super()._prepare_liquidity_account_vals(company, code, vals) |
| 13 | |
| 14 | if company.account_fiscal_country_id.code == 'NL': |
| 15 | # Ensure the newly liquidity accounts have the right account tag in order to be part |
| 16 | # of the Dutch financial reports. |
| 17 | account_vals.setdefault('tag_ids', []) |
| 18 | account_vals['tag_ids'].append((4, self.env.ref('l10n_nl.account_tag_25').id)) |
| 19 | |
| 20 | return account_vals |