Odoo18-Base/addons/l10n_my/migrations/1.1/end-migrate_update_taxes.py
2025-01-06 10:57:38 +07:00

10 lines
440 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, SUPERUSER_ID
def migrate(cr, version):
""" Update taxes for existing companies, in order to apply the new tags to them. """
env = api.Environment(cr, SUPERUSER_ID, {})
for company in env['res.company'].search([('chart_template', '=', 'my')], order="parent_path"):
env['account.chart.template'].try_loading('my', company)