Search Engine Serilizer Pydantic

search_engine_serializer_pydantic
REPOSITORY
REPOSITORYOCA/search-engine
GIT
GIThttps://github.com/OCA/search-engine.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/search-engine/tree/18.0/search_engine_serializer_pydantic
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSLaurent Mignon (ACSONE), Sébastien BEAU, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/search-engine
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/queue:
    - queue_job
OCA/rest-framework:
    - pydantic
OCA/search-engine:
    - connector_search_engine
OCA/server-env:
    - server_environment
OCA/server-tools:
    - base_partition
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pydantic
typing-extensions
unidecode
requests
contextvars
pydantic>=2.0.0
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module is a technical module that define a new abstract class named
`PydandicModelSerializer` that inherit from
`odoo.addons.connector_search_engine.tools.serializer.ModelSerializer`

This new class define a new abstract method `get_model_class`. This method is used by
the index to get the Pydantic model class to use to generate the json schema.

On the index form, if the serializer is a `PydanticModelSerializer`, a field is
displayed to display the related json schema and therefore provide documentation about
the fields exported and their characteristics.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
se_index_form_view se.index.form se.index group Inherits connector_search_engine.se_index_form_view
Models touched (1)

New fields (3)
  • is_pydantic_serializer Boolean
    compute='_compute_is_pydantic_serializer' store=False string='Is a Serializer based on Pydantic Model?'
  • record_json_schema Serialized
    compute='_compute_record_json_schema' store=False string='JSON Schema of a record stored in this index (as dict)'
  • record_json_schema_str Char
    compute='_compute_record_json_schema' store=False string='JSON Schema of a record stored in this index'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/search-engine
GIT
GIThttps://github.com/OCA/search-engine.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/search-engine/tree/16.0/search_engine_serializer_pydantic
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSLaurent Mignon (ACSONE), Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/search-engine
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:12:08
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/queue:
    - queue_job
OCA/rest-framework:
    - pydantic
OCA/search-engine:
    - connector_search_engine
OCA/server-env:
    - server_environment
OCA/server-tools:
    - base_partition
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pydantic
typing-extensions
unidecode
requests
contextvars
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module is a technical module that define a new abstract class named
`PydandicModelSerializer` that inherit from
`odoo.addons.connector_search_engine.tools.serializer.ModelSerializer`

This new class define a new abstract method `get_model_class`. This method is used by
the index to get the Pydantic model class to use to generate the json schema.

On the index form, if the serializer is a `PydanticModelSerializer`, a field is
displayed to display the related json schema and therefore provide documentation about
the fields exported and their characteristics.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
se_index_form_view se.index.form se.index field Inherits connector_search_engine.se_index_form_view
Models touched (1)

New fields (3)
  • is_pydantic_serializer Boolean
    compute='_compute_is_pydantic_serializer' store=False string='Is a Serializer based on Pydantic Model?'
  • record_json_schema Serialized
    compute='_compute_record_json_schema' store=False string='JSON Schema of a record stored in this index (as dict)'
  • record_json_schema_str Char
    compute='_compute_record_json_schema' store=False string='JSON Schema of a record stored in this index'
Public methods (0)

No public methods.