mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 12:11:59 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2023 CreuBlanca
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class IrModel(models.Model):
|
||||
_inherit = "ir.model"
|
||||
|
||||
is_mgmtsystem_evaluation = fields.Boolean(
|
||||
string="Management System Evaluation",
|
||||
default=False,
|
||||
help="Whether this model supports evaluations.",
|
||||
)
|
||||
|
||||
def _reflect_model_params(self, model):
|
||||
vals = super()._reflect_model_params(model)
|
||||
vals["is_mgmtsystem_evaluation"] = (
|
||||
issubclass(type(model), self.pool["mgmtsystem.evaluation.abstract"])
|
||||
and not model._abstract
|
||||
)
|
||||
return vals
|
||||
Loading…
Add table
Add a link
Reference in a new issue