[FIX] l10n_lu: fix the migration script
The migration script for taxes was forward-ported without changes from 15.0 to master. However, it should be done differently since saas-16.2. closes odoo/odoo#145338 X-original-commit: d5179bf65294bced57877579c56deb9e72ecb177 Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com> Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
This commit is contained in:
@@ -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')
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user