addons/l10n_hr_edi/__init__.py
raw| 1 | from . import models |
| 2 | from . import wizard |
| 3 | |
| 4 | |
| 5 | def post_init(env): |
| 6 | # Loading new field 'l10n_hr_tax_category_id' for existing Croatian taxes |
| 7 | for company in env['res.company'].search([('chart_template', '=', 'hr')], order="parent_path"): |
| 8 | Template = env['account.chart.template'].with_company(company) |
| 9 | Template._load_data({ |
| 10 | 'account.tax': { |
| 11 | xmlid: vals |
| 12 | for xmlid, vals in Template._get_hr_edi_account_tax().items() |
| 13 | if Template.ref(xmlid, raise_if_not_found=False) |
| 14 | } |
| 15 | }) |