| 1 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 |
|
| 3 |
from . import models |
| 4 |
from . import wizard |
| 5 |
|
| 6 |
|
| 7 |
def post_init(env): |
| 8 |
for company in env['res.company'].search([('chart_template', '=', 'hu')], order="parent_path"): |
| 9 |
# Apply default cash rounding configuration |
| 10 |
company._l10n_hu_edi_configure_company() |
| 11 |
|
| 12 |
# Set Hungarian fields on taxes |
| 13 |
env['account.chart.template'].with_company(company)._load_data({ |
| 14 |
'account.tax': { |
| 15 |
xmlid: vals |
| 16 |
for xmlid, vals in env['account.chart.template']._get_hu_account_tax().items() |
| 17 |
if env['account.chart.template'].with_company(company).ref(xmlid, raise_if_not_found=False) |
| 18 |
} |
| 19 |
}) |