# oca/server-tools architecture

> Architecture diagram of the GitHub repository oca/server-tools, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oca/server-tools
- Repository: https://github.com/oca/server-tools

## Overview

OCA server-tools is a collection of independent Odoo addons, not one application with a single end-to-end workflow. Users configure or invoke individual addons to change Odoo behavior or produce operational results: for example, fetch mail into Odoo records, exchange Excel data, or compare database versions. The graph preserves major documented capability areas and shows only a few relationships directly supported by sampled source. Many addon implementations were not sampled, so their internal wiring is intentionally omitted.

Main entry points: [`excel_import_export`](https://github.com/oca/server-tools/tree/18.0/excel_import_export) (Excel import export), [`excel_import_export/static/src/js/report/action_manager_report.esm.js`](https://github.com/oca/server-tools/blob/18.0/excel_import_export/static/src/js/report/action_manager_report.esm.js) (Browser download), [`upgrade_analysis/models/upgrade_analysis.py`](https://github.com/oca/server-tools/blob/18.0/upgrade_analysis/models/upgrade_analysis.py) (Upgrade analysis), [`fetchmail_attach_from_folder/models/fetchmail_server_folder.py`](https://github.com/oca/server-tools/blob/18.0/fetchmail_attach_from_folder/models/fetchmail_server_folder.py) (Folder mail fetch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_attachments["Attachments and mail"]
  node_folder_fetch["Folder mail fetch"]
  node_mail_records["Mail records"]
  node_attachment_queue["Attachment queue"]
  node_queue_email["Email attachments"]
  node_attachment_sync["Attachment sync"]
  node_storage_backend["Storage backend<br/>[storage_backend.py]"]
  node_attachment_controls["Attachment controls"]
  node_attachment_index["Indexing controls"]
  node_mail_cleanup["Mail cleanup"]
end

subgraph group_framework["Odoo extensions"]
  node_base_extensions["Model extensions"]
  node_search_extensions["Search extensions"]
  node_exception_rules["Exception rules"]
end

subgraph group_operations["Database operations"]
  node_backup["Database backup"]
  node_db_cleanup["Database cleanup"]
  node_db_tuning["Autovacuum tuning"]
end

subgraph group_exchange["Data exchange"]
  node_xlsx_exchange["Excel import export"]
  node_xlsx_browser["Browser download"]
  node_json_export["JSON export"]
end

subgraph group_governance["Governance and analysis"]
  node_audit_log["Audit logging"]
  node_session_audit["HTTP session audit<br/>[http_session.py]"]
  node_module_analysis["Module analysis"]
  node_upgrade_analysis["Upgrade analysis"]
end

node_operator(("Odoo user"))
node_postgres[("PostgreSQL")]
node_remote_odoo["Remote Odoo"]

node_folder_fetch -->|"processes matched mail"| node_mail_records
node_attachment_sync -->|"relates sync tasks"| node_storage_backend
node_operator -->|"uses import/export"| node_xlsx_exchange
node_xlsx_exchange -->|"registers report handler"| node_xlsx_browser
node_xlsx_browser -->|"downloads report"| node_operator
node_operator -->|"runs comparison"| node_upgrade_analysis
node_upgrade_analysis -->|"retrieves remote records"| node_remote_odoo
node_db_tuning -->|"queries and alters tables"| node_postgres
node_session_audit -->|"records session"| node_audit_log

click node_folder_fetch "https://github.com/oca/server-tools/blob/18.0/fetchmail_attach_from_folder/models/fetchmail_server_folder.py"
click node_attachment_queue "https://github.com/oca/server-tools/tree/18.0/attachment_queue"
click node_queue_email "https://github.com/oca/server-tools/tree/18.0/attachment_queue_email"
click node_attachment_sync "https://github.com/oca/server-tools/tree/18.0/attachment_synchronize"
click node_storage_backend "https://github.com/oca/server-tools/blob/18.0/attachment_synchronize/models/storage_backend.py"
click node_attachment_controls "https://github.com/oca/server-tools/tree/18.0/attachment_delete_restrict"
click node_attachment_index "https://github.com/oca/server-tools/tree/18.0/attachment_unindex_content"
click node_mail_cleanup "https://github.com/oca/server-tools/tree/18.0/autovacuum_message_attachment"
click node_base_extensions "https://github.com/oca/server-tools/tree/18.0/base_time_parameter"
click node_search_extensions "https://github.com/oca/server-tools/tree/18.0/base_search_fuzzy"
click node_exception_rules "https://github.com/oca/server-tools/tree/18.0/base_exception"
click node_audit_log "https://github.com/oca/server-tools/tree/18.0/auditlog"
click node_session_audit "https://github.com/oca/server-tools/blob/18.0/auditlog/models/http_session.py"
click node_module_analysis "https://github.com/oca/server-tools/tree/18.0/module_analysis"
click node_upgrade_analysis "https://github.com/oca/server-tools/blob/18.0/upgrade_analysis/models/upgrade_analysis.py"
click node_xlsx_exchange "https://github.com/oca/server-tools/tree/18.0/excel_import_export"
click node_xlsx_browser "https://github.com/oca/server-tools/blob/18.0/excel_import_export/static/src/js/report/action_manager_report.esm.js"
click node_json_export "https://github.com/oca/server-tools/tree/18.0/jsonifier"
click node_backup "https://github.com/oca/server-tools/tree/18.0/auto_backup"
click node_db_cleanup "https://github.com/oca/server-tools/tree/18.0/database_cleanup"
click node_db_tuning "https://github.com/oca/server-tools/blob/18.0/database_autovacuum_tuning/models/database_autovacuum_tuning.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_folder_fetch,node_mail_records,node_attachment_queue,node_queue_email,node_attachment_sync,node_storage_backend,node_attachment_controls,node_attachment_index,node_mail_cleanup,node_operator toneBlue
class node_base_extensions,node_search_extensions,node_exception_rules,node_postgres toneAmber
class node_backup,node_db_cleanup,node_db_tuning toneMint
class node_xlsx_exchange,node_xlsx_browser,node_json_export toneRose
class node_audit_log,node_session_audit,node_module_analysis,node_upgrade_analysis,node_remote_odoo toneIndigo
```

## Components

### Attachments and mail

- [Folder mail fetch](https://github.com/oca/server-tools/blob/18.0/fetchmail_attach_from_folder/models/fetchmail_server_folder.py): `fetchmail_attach_from_folder/models/fetchmail_server_folder.py`
- **Mail records**
- [Attachment queue](https://github.com/oca/server-tools/tree/18.0/attachment_queue): `attachment_queue`
- [Email attachments](https://github.com/oca/server-tools/tree/18.0/attachment_queue_email): `attachment_queue_email`
- [Attachment sync](https://github.com/oca/server-tools/tree/18.0/attachment_synchronize): `attachment_synchronize`
- [Storage backend](https://github.com/oca/server-tools/blob/18.0/attachment_synchronize/models/storage_backend.py): `attachment_synchronize/models/storage_backend.py`
- [Attachment controls](https://github.com/oca/server-tools/tree/18.0/attachment_delete_restrict): `attachment_delete_restrict`
- [Indexing controls](https://github.com/oca/server-tools/tree/18.0/attachment_unindex_content): `attachment_unindex_content`
- [Mail cleanup](https://github.com/oca/server-tools/tree/18.0/autovacuum_message_attachment): `autovacuum_message_attachment`

### Odoo extensions

- [Model extensions](https://github.com/oca/server-tools/tree/18.0/base_time_parameter): `base_time_parameter`
- [Search extensions](https://github.com/oca/server-tools/tree/18.0/base_search_fuzzy): `base_search_fuzzy`
- [Exception rules](https://github.com/oca/server-tools/tree/18.0/base_exception): `base_exception`

### Database operations

- [Database backup](https://github.com/oca/server-tools/tree/18.0/auto_backup): `auto_backup`
- [Database cleanup](https://github.com/oca/server-tools/tree/18.0/database_cleanup): `database_cleanup`
- [Autovacuum tuning](https://github.com/oca/server-tools/blob/18.0/database_autovacuum_tuning/models/database_autovacuum_tuning.py): `database_autovacuum_tuning/models/database_autovacuum_tuning.py`

### Data exchange

- [Excel import export](https://github.com/oca/server-tools/tree/18.0/excel_import_export): `excel_import_export`
- [Browser download](https://github.com/oca/server-tools/blob/18.0/excel_import_export/static/src/js/report/action_manager_report.esm.js): `excel_import_export/static/src/js/report/action_manager_report.esm.js`
- [JSON export](https://github.com/oca/server-tools/tree/18.0/jsonifier): `jsonifier`

### Governance and analysis

- [Audit logging](https://github.com/oca/server-tools/tree/18.0/auditlog): `auditlog`
- [HTTP session audit](https://github.com/oca/server-tools/blob/18.0/auditlog/models/http_session.py): `auditlog/models/http_session.py`
- [Module analysis](https://github.com/oca/server-tools/tree/18.0/module_analysis): `module_analysis`
- [Upgrade analysis](https://github.com/oca/server-tools/blob/18.0/upgrade_analysis/models/upgrade_analysis.py): `upgrade_analysis/models/upgrade_analysis.py`

### Other components

- **Odoo user**
- **PostgreSQL**
- **Remote Odoo**

## Connections

- Folder mail fetch → Mail records: processes matched mail
- Attachment sync → Storage backend: relates sync tasks
- Odoo user → Excel import export: uses import/export
- Excel import export → Browser download: registers report handler
- Browser download → Odoo user: downloads report
- Odoo user → Upgrade analysis: runs comparison
- Upgrade analysis → Remote Odoo: retrieves remote records
- Autovacuum tuning → PostgreSQL: queries and alters tables
- HTTP session audit → Audit logging: records session
