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