|
|
@ -1,4 +1,4 @@ |
|
|
|
# Copyright 2017-2019 Onestein (<https://www.onestein.eu>) |
|
|
|
# Copyright 2017-2020 Onestein (<https://www.onestein.eu>) |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
import logging |
|
|
@ -37,13 +37,6 @@ models.BaseModel._auto_init = _auto_init |
|
|
|
class Base(models.AbstractModel): |
|
|
|
_inherit = "base" |
|
|
|
|
|
|
|
@api.model |
|
|
|
def _setup_complete(self): |
|
|
|
if not _bi_view(self._name): |
|
|
|
super()._setup_complete() |
|
|
|
else: |
|
|
|
self.pool.models[self._name]._log_access = False |
|
|
|
|
|
|
|
@api.model |
|
|
|
def _read_group_process_groupby(self, gb, query): |
|
|
|
if not _bi_view(self._name): |
|
|
@ -53,9 +46,3 @@ class Base(models.AbstractModel): |
|
|
|
if split[0] not in self._fields: |
|
|
|
raise UserError(_("No data to be displayed.")) |
|
|
|
return super()._read_group_process_groupby(gb, query) |
|
|
|
|
|
|
|
@api.model |
|
|
|
def _add_magic_fields(self): |
|
|
|
if _bi_view(self._name): |
|
|
|
self._log_access = False |
|
|
|
return super()._add_magic_fields() |