Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 169 additions & 0 deletions auditlog_clickhouse_read/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
===========================================
Read auditlog records stored in clickhouse.
===========================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7ab4f4be05c697769b63a62b6d1c7b080afe57e7a48a9c02ef74ba4683853f50
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/18.0/auditlog_clickhouse_read
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-auditlog_clickhouse_read
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the audit log integration with ClickHouse to let
Odoo read audit log data through PostgreSQL Foreign Data Wrapper (FDW).

When FDW read mode is enabled, standard Odoo audit log views continue to
work without additional user tools or direct database access, while the
data is read from ClickHouse. Audit log records become read-only in Odoo
while this mode is active.

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to:

1. Make sure the PostgreSQL extension ``pg_clickhouse`` is installed
and available on the PostgreSQL server used by Odoo.

2. Make sure the ClickHouse database is reachable from the Odoo server.

3. Make sure the audit log tables already exist in ClickHouse.

4. Activate developer mode in Odoo.

5. Go to *Settings > Technical > Auditlog > ClickHouse Configurations*.

6. Open the active ClickHouse configuration used for audit log export.

7. Fill in or verify the connection parameters:

- *Hostname or IP*
- *TCP Port*
- *Database name*
- *User*
- *Password*

8. Use *Test Connection* to verify that Odoo can connect to ClickHouse.

9. Use *Create Auditlog Tables* if the ClickHouse audit log tables have
not yet been created.

10. Click *Enable FDW read* to switch standard Odoo audit log views to
ClickHouse-backed foreign tables.

Important notes:

- Only the active ClickHouse configuration can enable FDW read.
- The PostgreSQL user used by Odoo must have the required privileges to
create and use FDW objects.
- While FDW read is enabled, the active ClickHouse configuration cannot
be deactivated, deleted, or changed for connection-related fields
until FDW read is disabled.
- While FDW read is enabled, do not update all Odoo modules and do not
update the ``auditlog`` module alone. Module updates may recreate or
alter auditlog PostgreSQL objects and break the FDW-based read setup.
- Before running any module update that may affect auditlog objects,
first click *Disable FDW read*. After the update is completed, enable
FDW read again if needed.

Usage
=====

To use this module, you need to:

1. Click *Enable FDW read*.

2. Open the standard audit log menus in Odoo:

- *Settings > Technical > Audit > Logs*

3. Review audit log records as usual from the standard Odoo interface.

4. Use the existing search, filters, and group-by options in audit log
views to analyze audit data stored in ClickHouse.

5. Open an audited record and use the standard *View Logs* action when
available. The action continues to open the related audit log entries
through the standard Odoo interface.

Important notes:

- While FDW read mode is enabled, audit log records are read-only in
Odoo.
- To return to local PostgreSQL audit log tables, go back to the active
ClickHouse configuration and click *Disable FDW read*.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog_clickhouse_read%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Cetmix

Contributors
------------

- `Cetmix <https://cetmix.com/>`__

- Ivan Sokolov
- George Smirnov
- Dmitry Meita

Other credits
-------------

The development of this module has been financially supported by:

- Geschäftsstelle Sozialinfo

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/18.0/auditlog_clickhouse_read>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions auditlog_clickhouse_read/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2026 Cetmix OÜ
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
18 changes: 18 additions & 0 deletions auditlog_clickhouse_read/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2026 Cetmix OÜ
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Read auditlog records stored in clickhouse.",
"version": "18.0.1.0.0",
"summary": "Read auditlog from clickhouse using FDW",
"category": "Tools",
"license": "AGPL-3",
"author": "Odoo Community Association (OCA), Cetmix",
"website": "https://github.com/OCA/server-tools",
"depends": [
"auditlog_clickhouse_write",
],
Comment thread
tendil marked this conversation as resolved.
"data": [
"views/auditlog_clickhouse_config_views.xml",
],
}
Loading
Loading