[FIX] l10n_tr: remove deprecated chart template method ref
As rewrite the whole chart template mechanism, From here: https://github.com/odoo/odoo/commit/512574861691f425ec6a17f20fe4b586bb88a299 we need to remove chart template reference from localization module. some of them are remaining. so removed from Turkey, Turkey localization in migration script otherwise we got this error: ``` File "/home/odoo/src/odoo/saas-16.3/addons/l10n_tr/migrations/1.1/end-migrate_update_taxes.py", line 2, in <module> from odoo.addons.account.models.chart_template import update_taxes_from_templates ImportError: cannot import name 'update_taxes_from_templates' from 'odoo.addons.account.models.chart_template' (/home/odoo/src/odoo/saas-16.3/addons/account/models/chart_template.py) ``` closes odoo/odoo#133463 X-original-commit: 57a32afb534f18022d632b03a39a316bce2817ab Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo.addons.account.models.chart_template import update_taxes_from_templates
|
||||
from odoo import api, SUPERUSER_ID
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
update_taxes_from_templates(cr, 'l10n_tr.l10n_tr_chart_template')
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
for company in env['res.company'].search([('chart_template', '=', 'tr')]):
|
||||
env['account.chart.template'].try_loading('tr', company)
|
||||
|
||||
Reference in New Issue
Block a user