Debian Codegraph @

addons/l10n_dk/migrations/1.3/end-migrate.py

raw
1 from odoo import api, SUPERUSER_ID
2
3
4 def migrate(cr, version):
5 env = api.Environment(cr, SUPERUSER_ID, {})
6 for company in env['res.company'].search([('chart_template', '=', 'dk')], order="parent_path"):
7 tax = env.ref(f'account.{company.id}_tax_keumf', raise_if_not_found=False)
8 if tax:
9 tax.type_tax_use = 'purchase'