<commit_before># -*- coding: utf-8 -*-
# Copyright 2017 Onestein (<http://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import api, models
from odoo.exceptions import Warning as UserError
from odoo.tools.translate import _


class Base(models.AbstractModel):
    _inherit = 'base'

    @api.model
    def _is_x_bve(self):
        if self._name[0:6] != 'x_bve.':
            return True
        return False

    @api.model
    def _auto_end(self):
        if self._is_x_bve():
            super(Base, self)._auto_end()

    @api.model
    def _setup_complete(self):
        if self._is_x_bve():
            super(Base, self)._setup_complete()

    @api.model
    def _read_group_process_groupby(self, gb, query):
        if self._is_x_bve:
            return super(Base, self)._read_group_process_groupby(gb, query)
<commit_msg>Code refactoring of module 'bi_view_editor';<commit_after># -*- coding: utf-8 -*-
# Copyright 2017 Onestein (<http://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import api, models
from odoo.exceptions import Warning as UserError
from odoo.tools.translate import _


class Base(models.AbstractModel):
    _inherit = 'base'

    @api.model
    def _not_bi_view(self):
        if self._name[0:6] != 'x_bve.':
            return True
        return False

    @api.model
    def _auto_end(self):
        if self._not_bi_view():
            super(Base, self)._auto_end()

    @api.model
    def _setup_complete(self):
        if self._not_bi_view():
            super(Base, self)._setup_complete()

    @api.model
    def _read_group_process_groupby(self, gb, query):
        if self._not_bi_view():
            return super(Base, self)._read_group_process_groupby(gb, query)

{'fraction_non_alphanumeric': 0.12243767313019391, 'fraction_numerical': 0.009972299168975069, 'mean_word_length': 2.7546777546777546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3286488', 'n_tokens_mistral': 637, 'n_tokens_neox': 614, 'n_words': 134}