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 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.account.models.chart_template import update_taxes_from_templates
def migrate(cr, version):
update_taxes_from_templates(cr, 'l10n_es.account_chart_template_common')

View file

@ -0,0 +1,28 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, SUPERUSER_ID
from odoo.addons.account.models.chart_template import update_taxes_from_templates
def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})
for company in env.companies:
taxes_to_disable = (
f'{company.id}_account_tax_template_p_iva5_ic_bc',
f'{company.id}_account_tax_template_p_iva5_ic_sc',
f'{company.id}_account_tax_template_p_iva5_ibc',
f'{company.id}_account_tax_template_p_iva5_isc',
f'{company.id}_account_tax_template_p_iva5_bc',
f'{company.id}_account_tax_template_p_iva5_sc',
f'{company.id}_account_tax_template_p_iva5_nd',
f'{company.id}_account_tax_template_s_iva5s',
f'{company.id}_account_tax_template_s_iva5b',
f'{company.id}_account_tax_template_s_req062',
f'{company.id}_account_tax_template_p_req062',
)
tax_ids = env['ir.model.data'].search([
('name', 'in', taxes_to_disable),
('model', '=', 'account.tax'),
]).mapped('res_id')
env['account.tax'].browse(tax_ids).active = False
update_taxes_from_templates(cr, 'l10n_es.account_chart_template_common')