Fixes #26102: Add Odoo ERP Database Connector and Ingestion Topology#27645
Fixes #26102: Add Odoo ERP Database Connector and Ingestion Topology#27645mohitjeswani01 wants to merge 6 commits intoopen-metadata:mainfrom
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
There was a problem hiding this comment.
Pull request overview
Adds a new Odoo ERP database connector to OpenMetadata, spanning spec/UI wiring and a Python ingestion implementation that extracts Odoo model + field metadata via XML-RPC.
Changes:
- Register
Odooas aDatabaseServiceTypeand add theodooConnectionschema for UI-driven configuration. - Implement an Odoo ingestion source (
OdooSource) plus XML-RPC client (OdooClient) and type mapping for tables/columns. - Add offline unit tests for client/connection testing/topology mapping.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/utils/DatabaseServiceUtils.tsx | Adds Odoo connection schema selection in DB service config form logic. |
| openmetadata-ui/src/main/resources/ui/src/assets/svg/odoo.svg | Adds an Odoo icon asset for UI usage. |
| openmetadata-spec/src/main/resources/json/schema/entity/services/databaseService.json | Registers Odoo in database service enums and connection anyOf. |
| openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/odooConnection.json | New JSON schema for configuring Odoo XML-RPC connectivity. |
| ingestion/src/metadata/utils/constants.py | Adds Odoo to the non-SQLAlchemy database connection allowlist. |
| ingestion/src/metadata/ingestion/source/database/odoo/service_spec.py | Registers the metadata source class via ServiceSpec. |
| ingestion/src/metadata/ingestion/source/database/odoo/models.py | Adds Pydantic models for Odoo ir.model / ir.model.fields payloads. |
| ingestion/src/metadata/ingestion/source/database/odoo/constants.py | Defines Odoo-to-OpenMetadata DataType mapping. |
| ingestion/src/metadata/ingestion/source/database/odoo/client.py | Implements the XML-RPC client (auth + model/field queries + test calls). |
| ingestion/src/metadata/ingestion/source/database/odoo/connection.py | Implements connector get_connection and test_connection steps. |
| ingestion/src/metadata/ingestion/source/database/odoo/metadata.py | Implements ingestion topology overrides to emit OM Database/Schema/Table/Column entities. |
| ingestion/src/metadata/ingestion/source/database/odoo/README.md | Adds connector-local documentation and testing notes. |
| ingestion/src/metadata/ingestion/source/database/odoo/init.py | Package init for the new connector module. |
| ingestion/tests/unit/source/database/odoo/init.py | Test package init. |
| ingestion/tests/unit/source/database/odoo/test_client.py | Unit tests for XML-RPC client auth + basic calls. |
| ingestion/tests/unit/source/database/odoo/test_connection.py | Unit tests for connection factory + test-connection wiring. |
| ingestion/tests/unit/source/database/odoo/test_metadata.py | Unit tests for topology mapping (models → tables, fields → columns). |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ Approved 2 resolved / 2 findingsIntegrates the Odoo ERP database connector and ingestion topology, resolving the missing relation field mapping and the fragile context upsert implementation. No issues found. ✅ 2 resolved✅ Bug:
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar
|
Hello @PubChimps , @harshach — I have addressed all 10 feedback items from the Copilot and Gitar-bot reviews. Key Fixes Applied: Could you please take a look and provide the Thank you!🙏 |
Description:
Fixes #26102
WeMakeDevs x OpenMetadata Hackathon
Overview
This PR introduces a net-new, enterprise-grade database ingestion connector for Odoo ERP. Odoo does not expose its rich metadata (like human-readable model descriptions or relational field boundaries) through standard SQL
INFORMATION_SCHEMA. To bring actual ERP business context into OpenMetadata, this connector acts as an external client, querying Odoo's internal application registries (ir.modelandir.model.fields) via XML-RPC and mapping them to OpenMetadata entities.What changes did you make?
odooConnection.json. To prevent UI rendering bugs, all schema types are fully inlined (flattened) rather than using nested$refs.Odootype indatabaseService.jsonand wired the dynamic React forms inDatabaseServiceUtils.tsxalongside a newodoo.svgasset.odoo/client.py): - Built a lightweight client utilizing Python's nativexmlrpc.client. It authenticates against the Odoo/commonendpoint to retrieve a sessionuid, then proxies queries to the/objectendpoint. Zero external Odoo libraries were introduced, keeping the dependency tree clean.models.py): - BuiltOdooModelandOdooFieldvalidators.Falseinstead ofNoneor an empty string. The models utilizeOptional[Union[str, bool]]with downstream sanitization to prevent pipeline crashes during live ingestion.metadata.py&constants.py): - Implemented the metadata extraction layer extendingCommonDbSourceService(mirroring the SAP ERP architectural pattern).get_tables_name_and_typeto map Odoo models to OM Tables, caching human-readable descriptions inself.context.yield_tableto map Odoo fields to OM Columns using a strict Odoo-to-OpenMetadataDataTypemapping dictionary.try/exceptblocks yieldingEither(left=StackTraceError)to ensure single-table failures do not halt the entire pipeline.README.mdwithin the connector package detailing the architecture.pytestsuite mocking the XML-RPCServerProxyto test the client, connection tester, and topological mapping completely offline.**Why did you make them? **
This unlocks deep ERP metadata for data governance. By extracting the human-readable
field_descriptionand module names from Odoo, and translating complex relational fields (many2one,one2many), we immediately surface business context to the end-user. This paves the way for automated lineage mapping between Odoo ERP and downstream data warehouses directly within OpenMetadata.How did you test your changes?
make generateto ensure Pydantic and Java models compiled cleanly from the newodooConnection.jsonspec.pytest ingestion/tests/unit/source/database/odoo/with a 100% pass rate. Tests utilizeunittest.mock.patchto simulate Odoo API responses and connection drops.make py_formatandmake py_lintfor strict CI/CD compliance.Test Coverage Evidence:

Type of change:
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes #26102: Add Odoo ERP Database Connector and Ingestion TopologyI have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: I updated the migration scripts or explained why it is not needed. (Note: Migration scripts are not required as this is a net-new schema addition, not a modification of an existing schema).
The issue properly describes why the new feature is needed, what's the goal, and how we are building it. Any discussion or decision-making process is reflected in the issue.
I have updated the documentation.
I have added tests around the new logic.
Summary by Gitar
contextbased storage for table descriptions with a private_model_descriptionsdictionary inOdooSource.filter_by_tableto support table pattern filtering during the metadata extraction process.get_database_schema_namestoget_raw_database_schema_namesto improve internal consistency.relationfield to theget_model_fieldsclient method to capture relational metadata.This will update automatically on new commits.