Skip to main content
Version: Next ๐Ÿšง

Profiles & Account Isolation Technical Reference

The Profiles module handles user profile setups and provides local data isolation across multiple Odoo instances.

Codebase Mapโ€‹

LayerPathPurpose
UI Componentsqml/features/settings/Profiles.qmlProfile selection and instance switching interface
Logic & Statemodels/accounts.jsSession validation and active instance token switching

Database Multi-Instance Isolationโ€‹

The SQLite schema isolation uses a relational key user_id mapping to the active row in the users (accounts) table.

SQL Filter Strategyโ€‹

Every data retrieval query executed by JavaScript models checks the current active user context from the global settings:

SELECT * FROM project_task_app
WHERE user_id = (SELECT value FROM app_settings WHERE key = 'active_user_id');

This structure ensures that data from separate accounts/instances (e.g., Work vs Personal) is segregated, avoiding data leaks between environments.