Initial commit: L10N_Americas packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:52 +02:00
commit 12b27ce151
714 changed files with 79328 additions and 0 deletions

View file

@ -0,0 +1,15 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, Command, SUPERUSER_ID
def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})
# Migrate wrong data tag on account cuenta102_02
debit_tag = env.ref('l10n_mx.tag_debit_balance_account')
credit_tag = env.ref('l10n_mx.tag_credit_balance_account')
account_102_ids = env['ir.model.data'].search([
('name', 'ilike', '%_cuenta102_02'),
('model', '=', 'account.account'),
]).mapped('res_id')
accounts_102 = env['account.account'].search([('id', 'in', account_102_ids)])
accounts_102.tag_ids = [Command.unlink(credit_tag.id), Command.link(debit_tag.id)]