| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 3001 |
| Technical Name |
hdk_o2o_connector |
| License | LGPL-3 |
| Website | https://www.hamdek.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 3001 |
| Technical Name |
hdk_o2o_connector |
| License | LGPL-3 |
| Website | https://www.hamdek.com |
Odoo to Odoo Connector
The ultimate data-sync & migration bridge for Odoo 19. Pull or push any model between two Odoo instances — via secure XML-RPC or blazing-fast direct PostgreSQL — with full relation handling, incremental ID mapping, and a per-run audit log.
Designed for real-world upgrades and coexistence: use built-in sample rule templates (demo sync rules) to kick-start common import and export scenarios, then fine-tune which stored fields move in each direction. When source and target differ — different Odoo versions, renamed technical models, or slightly different field layouts — you stay in control with explicit model name aliases and a field-level sync configuration so data lands on the correct records without hand-editing the database.
Two Powerful Transport Modes
XML-RPC (Recommended)
Uses the standard Odoo XML-RPC API — works across versions, Odoo.sh, and firewalled networks. No database port exposure required. Compatible with any Odoo instance reachable over HTTPS.
PostgreSQL Direct
For same-network instances, connect directly to the remote PostgreSQL database for high-throughput bulk reads and writes. Ideal for large-scale migrations where RPC speed is insufficient.
Key Features
Named Connections
Store reusable connections with URL, database, login, and password. Supports model-name aliases so older remote instances (e.g. Odoo 16/17) map to their updated equivalents in Odoo 19.
Flexible Sync Rules
Pick any installed model, choose exactly which stored fields to transfer, apply an Odoo domain filter on the remote side, and set batch size and record limits for fine-grained performance tuning.
Pull & Push
Pull records from the remote into this database, or Push local records back to the remote. Run both directions on the same connection for true bidirectional sync.
ID Mapping & Incremental Sync
Remote-to-local ID pairs are persisted after each run. Subsequent pulls/pushes update existing records instead of duplicating them, enabling safe incremental synchronisation over time.
Relation Handling
Automatically resolves Many2one targets, expands Many2many sets, and syncs One2many children via sub-rules (e.g. sale.order.line after sale.order). Configurable recursion depth prevents runaway imports.
Match by Business Key
Deduplicate using any unique field — default_code, barcode,
name, etc. Existing records are updated instead of duplicated,
even on a fresh import where no ID map yet exists.
Per-Run Audit Log
Every run generates audit lines recording created, updated, skipped, and failed rows — with domain hints pinpointing the exact remote record that caused a problem for fast remediation.
Remote Domain Filters
Apply any valid Odoo domain on the remote side — filter by state, date, company, and more. The same domain compiles for both RPC and PostgreSQL transport, so switching modes requires no extra config.
Selection Field Safety
Remote selection values that are invalid locally are gracefully handled: map to a configurable default or skip the field entirely, preventing import errors when model definitions differ between instances.
Built-In Import & Export Templates
Hit the ground running with sample sync rules (installed as demo templates when optional demo data is present): products, attribute lines, variants, partners, orders, and more — each with sensible field selections and parent/child ordering. Duplicate a rule as your own production-ready template, tweak domains and keys, then run Pull or Push.
Map Models and Fields
Beyond choosing stored fields per rule, align different technical model names between source and target (see below for version renames like lots and channels). Combine that with match-by-field keys and optional parent/child rules so relational data stays coherent even when IDs and schemas diverge.
Community & Enterprise Ready
The connector runs on standard Odoo APIs and PostgreSQL — no enterprise-only server hooks required for XML-RPC mode. Use it on Community databases, Enterprise stacks, Odoo.sh, or mixed topologies; transport and rule features behave the same wherever your subscription tier allows the underlying models to exist.
Cross-Version Model & Field Mapping
Odoo evolves: technical model names and stored fields change between releases. The connector is built for that reality — you configure how the remote side is addressed and which local fields receive the payload, without maintaining one-off SQL scripts for every upgrade.
Model name aliases
On each Connection, define RPC model name aliases so the remote XML-RPC model string differs from the local rule model when Odoo renames a model between versions.
Example — serialised lots / traceability:
-
Older databases often expose
stock.product.lotas the technical model for serial/lot records. -
Current Odoo uses
stock.lotfor the same concept. -
Map one to the other in the alias table so a rule targeting
stock.lotlocally reads or writes the correct remote model automatically.
Field-level control
Each Sync Rule lists the stored fields you want to move. Omit deprecated remote fields, rely on defaults for new local columns, and use domains plus batch limits to slice large tables.
Other rename patterns you may recognise:
mail.channel→discuss.channel(Discuss)- Enterprise-only models: only sync where both sides have the module installed.
- Custom modules: alias your staging technical name to production if they differ.
Common Use Cases
-
On-premise → Odoo.sh migration
Install on the target, point at your on-prem URL, pull rules in dependency order (partners → pricelists → products → sale orders). -
Production ↔ Staging synchronisation
Keep staging data fresh by pulling a subset of live records on demand, without manual database dumps. -
Multi-company master-data replication
Push products, pricelists, or partner records from a central Odoo to subsidiary instances automatically. -
Selective model sync
Transfer only what you need — e.g. products and categories from one instance while leaving financials untouched.
Any Direction. Any Model.
Pull or push — from any Odoo instance to any other. No specialist DBA skills required; configure entirely from the Odoo UI.
Workflow Highlights
From first connection to recurring incremental runs, the connector follows a clear path you can repeat for every environment. The thumbnails below are placeholders — swap each image for your own screenshots when publishing the module page.
Install on the target instance
Install Odoo to Odoo Connector on the database that will receive or orchestrate the sync (typically staging, Odoo.sh, or the new production). Grant connector access only to users who should see remote credentials.
Create & test a connection
Register the remote URL, database name, and credentials. Run Test Connection to verify XML-RPC reachability (or configure PostgreSQL direct mode for high-volume, trusted networks). Add model name aliases now if you already know version-specific renames.
Pick a sample template or define a sync rule
Start from a shipped sample rule (demo template) for a common path, or create a rule from scratch: choose the local model, tick stored fields to transfer, set a remote domain, batch size, and optional parent rule for One2many children.
Run Pull or Push & monitor the audit log
Execute Pull to import from remote into this database, or Push to publish local changes upstream. Each run writes audit lines (created, updated, skipped, failed) with domain hints so you can correct data issues and re-run safely.
Quick-Start Setup
- Install Odoo to Odoo Connector on the target Odoo instance (the one that will receive the data).
- Create a Connection — go to O2O Connector → Connections → New, enter the remote Odoo URL, database name, login, and password, then click Test Connection.
- Add Sync Rules — for each model you want to transfer, create a Sync Rule: select the model, tick the fields, optionally set a domain filter, and choose batch size.
-
Set relation order — for models with Many2one dependencies, create
rules for the parent first (e.g.
res.partnerbeforesale.order), or use Parent Rule / sub-rules for automatic child-after-parent ordering. - Pull or Push — click Pull on each rule to fetch remote records into this database, or Push to send local records to the remote.
- Review the Audit Log — open the Audit tab on any rule to see exactly which rows were created, updated, skipped, or failed, and use the domain hints to fix any mismatches quickly.
Technical Highlights
Cross-Version Compatible
XML-RPC transport works between different Odoo major versions.
Use the RPC model name aliases field on the Connection record
to remap model names that changed between releases (e.g. mail.channel
→ discuss.channel).
Batch & Chunk Control
Configure Batch size (number of IDs per read() call)
and Max records per run independently. This lets you tune memory
usage and run time without changing the sync logic.
Deep Relation Import
When pulling a Many2one target that has no local counterpart yet, the connector can recursively import the related record (up to relation max depth) — ensuring referential integrity without manual pre-population.
"Update Only" Pull Mode
Enable Pull: update existing records only to write to already-mapped or identifier-matched rows without ever creating new local records — perfect for controlled delta refreshes on production systems.
Support & Expert Services
admin@hamdek.com
www.hamdek.com
Please log in to comment on this module