<commit_before># Copyright (C) 2009  <NAME> - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
from . import tests

from odoo.addons import account
from odoo import api, SUPERUSER_ID

# Install Simple Chart of Account Template for Brazilian Companies
_auto_install_l10n_original = account._auto_install_l10n


def _auto_install_l10n_br_simple_coa(cr, registry):
    env = api.Environment(cr, SUPERUSER_ID, {})
    country_code = env.user.company_id.country_id.code
    if country_code and country_code.upper() == "BR":
        module_ids = env["ir.module.module"].search(
            [("name", "in", ("l10n_br_simple_coa",)), ("state", "=", "uninstalled")]
        )
        module_ids.sudo().button_install()
    else:
        _auto_install_l10n_original(cr, registry)


account._auto_install_l10n = _auto_install_l10n_br_simple_coa<commit_msg>[12.0][FIX] Change l10n_br_simple_coa to l10n_br_coa_simple<commit_after># Copyright (C) 2009  <NAME> - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
from . import tests

from odoo.addons import account
from odoo import api, SUPERUSER_ID

# Install Simple Chart of Account Template for Brazilian Companies
_auto_install_l10n_original = account._auto_install_l10n


def _auto_install_l10n_br_coa_simple(cr, registry):
    env = api.Environment(cr, SUPERUSER_ID, {})
    country_code = env.user.company_id.country_id.code
    if country_code and country_code.upper() == "BR":
        module_ids = env["ir.module.module"].search(
            [("name", "in", ("l10n_br_coa_simple",)), ("state", "=", "uninstalled")]
        )
        module_ids.sudo().button_install()
    else:
        _auto_install_l10n_original(cr, registry)


account._auto_install_l10n = _auto_install_l10n_br_coa_simple
{'fraction_non_alphanumeric': 0.11530054644808743, 'fraction_numerical': 0.026775956284153007, 'mean_word_length': 4.231428571428571, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5797496', 'n_tokens_mistral': 676, 'n_tokens_neox': 637, 'n_words': 127}