Initial commit: L10N_Europe packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:52 +02:00
commit 9803722600
2377 changed files with 380711 additions and 0 deletions

View file

@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import account_journal
from . import account_chart_template
from . import res_partner
from . import res_company

View file

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
from odoo import api, Command, models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
def _load(self, company):
# Add tag to 999999 account
res = super(AccountChartTemplate, self)._load(company)
if company.account_fiscal_country_id.code == 'NL':
account = self.env['account.account'].search([('code', '=', '999999'), ('company_id', '=', self.env.company.id)])
if account:
account.tag_ids = [(4, self.env.ref('l10n_nl.account_tag_12').id)]
return res
@api.model
def _create_liquidity_journal_suspense_account(self, company, code_digits):
account = super()._create_liquidity_journal_suspense_account(company, code_digits)
if company.account_fiscal_country_id.code == 'NL':
account.tag_ids = [Command.link(self.env.ref('l10n_nl.account_tag_25').id)]
return account

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, 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.account_fiscal_country_id.code == 'NL':
# Ensure the newly liquidity accounts have the right account tag in order to be part
# of the Dutch financial reports.
account_vals.setdefault('tag_ids', [])
account_vals['tag_ids'].append((4, self.env.ref('l10n_nl.account_tag_25').id))
return account_vals

View file

@ -0,0 +1,9 @@
# coding: utf-8
from odoo import fields, models
class ResCompany(models.Model):
_inherit = 'res.company'
l10n_nl_kvk = fields.Char(related='partner_id.l10n_nl_kvk', readonly=False)
l10n_nl_oin = fields.Char(related='partner_id.l10n_nl_oin', readonly=False)

View file

@ -0,0 +1,9 @@
# coding: utf-8
from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
l10n_nl_kvk = fields.Char(string='KVK-nummer')
l10n_nl_oin = fields.Char(string='Organisatie Indentificatie Nummer')