| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 3 |
|
| 4 |
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr |
| 5 |
from . import models |
| 6 |
from . import wizard |
| 7 |
|
| 8 |
from odoo.addons.account.models.chart_template import preserve_existing_tags_on_taxes |
| 9 |
|
| 10 |
|
| 11 |
def _l10n_fr_post_init_hook(env): |
| 12 |
_preserve_tag_on_taxes(env) |
| 13 |
_setup_inalterability(env) |
| 14 |
|
| 15 |
def _preserve_tag_on_taxes(env): |
| 16 |
preserve_existing_tags_on_taxes(env, 'l10n_fr_account') |
| 17 |
|
| 18 |
def _setup_inalterability(env): |
| 19 |
# enable ping for this module |
| 20 |
env['publisher_warranty.contract'].update_notification(cron_mode=True) |
| 21 |
|
| 22 |
fr_companies = env['res.company'].search([('partner_id.country_id.code', 'in', env['res.company']._get_france_country_codes())]) |
| 23 |
if fr_companies: |
| 24 |
fr_companies._create_secure_sequence(['l10n_fr_closing_sequence_id']) |