OdooWiki OCA HUB

User roles activities

base_user_role_activity folder_open OCA/server-backend open_in_new
Tools License: LGPL-3

System Parameter

The activity is created base_user_role_activity.reminder_days = 30 (days) before the end date by a scheduled action "User role expire reminder" and automatically removed, when asignment end date on the user role assignment is adapted.

Activity When a user role is about to expire (default=30 days), an activity is created for the user itself. The activity is linked to the user's res.partner entity.

The responsible user is computed by the hook res.users._get_role_manager(). Install hr_user_role_activity (OCA/hr) to assign the activity to the manager of the related employee instead.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Automatically creates a reminder activity on a user's contact when one of their role assignments is about to expire, and removes it when the role is extended or deleted.

This module watches user role assignments and warns people before a role expires, so access rights are not lost by surprise.

  • A scheduled job called "User role expire reminder" runs every day. It looks for role assignments whose end date falls within the next N days (30 by default, configurable through the system parameter base_user_role_activity.reminder_days).
  • For each affected user, an activity of type "User Role Expires" is scheduled on that user's contact record (res.partner). The activity shows the user's name and the list of expiring roles with their end dates, and asks to review the situation.
  • By default the activity is assigned to the user themselves. Other modules can change who receives it.
  • The activity's deadline is set to the earliest end date among the expiring roles. If the situation changes, the old activity is removed and a new one is created with the correct date; if nothing changed, no duplicate is created.
  • When a role assignment's end date is modified, or the assignment is deleted, the reminders are recalculated immediately: the activity is updated or removed if no role is expiring anymore.
  • Very short assignments whose start date is in the future are ignored.

It touches the role assignment lines (res.users.role.line), users (res.users) and their contacts (res.partner), and relies on the mail activities system.

Depends on

Models and fields (2)
  • res.users · extends an existing model
  • res.users.role.line · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/server-backend.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.