server-backend icon indicating copy to clipboard operation
server-backend copied to clipboard

[14.0][ADD] base_anonymize

Open hbrunn opened this issue 7 months ago • 1 comments

This module provides a flexible mechanism and default configuration for anonymizing data in an Odoo database.

Use Cases / Context

This module was developed because the OCA internal tools workgroup needs access to the OCA database, but shouldn't have access to the data of OCA members.

It should be useful in any setting where external developers need access to a database, or for setting up test instances.

Configuration

To configure this module, you need to:

  1. Go to Settings / Technical / Anonymization / Field Definitions
  2. Review fields to overwrite, every field can be overwritten by some method, and the overwritten records can be restricted by a domain

Usage

To use this module, you need to:

  1. Go to Settings / Technical / Anonymization / Run Anonymization
  2. Confirm you really mean it

The above is only for testing configurations, usually you would script this in some export setting by installing the module on a clone, possibly a custom module modifying the field configuration, and running the code env['anonymize.wizard'].action_run() before you export your file store and dump the database to wherever you need it.

!!CAUTION!! The default configuration overwrites the database secret and sets all passwords to password - for your tests, you will want to disable the field definitions for res.users and ir.config_parameter, because you'll be logged out after the anonymization run otherwise.

hbrunn avatar Mar 22 '25 05:03 hbrunn