diff --git a/addons/l10n_lu/migrations/2.2/end-migrate_update_taxes.py b/addons/l10n_lu/migrations/2.2/end-migrate_update_taxes.py deleted file mode 100644 index a36a459d145..00000000000 --- a/addons/l10n_lu/migrations/2.2/end-migrate_update_taxes.py +++ /dev/null @@ -1,6 +0,0 @@ -# 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_lu.lu_2011_chart_1') diff --git a/addons/l10n_lu/migrations/2.2/post-migrate_update_taxes.py b/addons/l10n_lu/migrations/2.2/post-migrate_update_taxes.py new file mode 100644 index 00000000000..4a60228244d --- /dev/null +++ b/addons/l10n_lu/migrations/2.2/post-migrate_update_taxes.py @@ -0,0 +1,7 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from odoo import api, SUPERUSER_ID + +def migrate(cr, version): + env = api.Environment(cr, SUPERUSER_ID, {}) + for company in env['res.company'].search([('chart_template', '=', 'lu')]): + env['account.chart.template'].try_loading('lu', company)