Public release from ruodoo-project: 19.0 - 2026-05-31 21:19:12 UTC

This commit is contained in:
CI Publish Bot
2026-05-31 21:19:21 +00:00
commit aa4214c195
1213 changed files with 183945 additions and 0 deletions

View File

@ -0,0 +1,26 @@
from odoo import api, fields, models
class IrModelFields(models.Model):
_inherit = "ir.model.fields"
docx_type_label = fields.Char(
string="Тип для DOCX",
compute="_compute_docx_type_label",
readonly=True,
)
@api.depends("ttype", "relation", "selection_ids.value")
def _compute_docx_type_label(self):
for field in self:
t = field.ttype or ""
if field.relation and field.ttype in ("many2one", "one2many", "many2many"):
t = f"{field.ttype} ({field.relation})"
elif field.ttype == "selection":
values = field.selection_ids.mapped("value")
if values:
t = f"selection ({', '.join(values)})"
else:
t = "selection"
field.docx_type_label = t