Skip to content

Odoo to PostgreSQL Sync Backend - Milad Eisanezhad - #9

Open
MiladEisanezhad wants to merge 1 commit into
odoonix:17.0from
MiladEisanezhad:MiladEisanezhad
Open

Odoo to PostgreSQL Sync Backend - Milad Eisanezhad#9
MiladEisanezhad wants to merge 1 commit into
odoonix:17.0from
MiladEisanezhad:MiladEisanezhad

Conversation

@MiladEisanezhad

Copy link
Copy Markdown

Summary

This project syncs contacts, products, sale orders, and sale order lines from Odoo into PostgreSQL.

The sync is safe to run multiple times. Existing records are updated when needed, and duplicate rows are never created.

The solution is located in the milad/ directory.

Running the Project

docker compose up --build

This starts Odoo, both PostgreSQL databases, builds the backend, applies the database migrations, and runs the sync.

For the complete setup instructions, see milad/User Documentation.md.

Running the Tests

docker compose up -d test-db
pytest -v

Project Structure

The project is split into a few small layers to keep responsibilities separate.

  • Adapter – communicates with Odoo
  • Mapper – converts Odoo data into internal models
  • Service – coordinates the sync process
  • Repository – handles database operations

The sync supports idempotent upserts, retries temporary connection failures, processes records in batches, and can perform incremental syncs based on the last successful run.

More implementation details are available in milad/Technical Documentation.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant