Skip to Content
Record Rules Base
base_record_rules

Record Rules Base

Adds visibility limits to search and grouped reads.

  • Odoo 17
  • Tools & Administration
  • 17.0.0.2.0
1

Overview

Standard record rules do not always hide records from name searches or grouped views. This technical module provides a mixin that limits which records appear in searches, name lookups and grouped reads. Developers set a domain on a model and the limit is applied for non-administrators. It is used by other custom modules that need stricter visibility. It has no screens of its own.

2

Usage steps

  1. 1

    Declare a limit domain

    A model inherits the mixin and sets a limit domain string. The domain can use the current user, time and company values. It is validated before use.

    • Attribute: _limit_domain
    • Context: user, company_ids
    • Invalid domain raises error
  2. 2

    Limit name searches

    When users type in a many2one selector, the name search adds the limit domain. Administrators are exempt. Other users see only allowed records in dropdowns.

    • Applies to non-admins
    • Dropdown results limited
    • Name search override
  3. 3

    Limit web searches and grouping

    Searches marked with the limit context and grouped reads also add the domain. Web list views and pivots therefore respect it. Records fetched for display are read without re-applying the limit.

    • Search override
    • Grouped read override
    • Fetch without re-limit
  4. 4

    Carry the limit through actions

    Window actions are extended so the limit context is passed to views. Menus opening a limited model automatically apply it. Developers do not need to repeat the setup.

    • Model: ir.actions.act_window
    • Context passed to views
    • Automatic
4

Roles

Benefiting roles
Role
Developer
Administrator
5

Dependencies

Back to version applications

Want to know more or try this app? Contact us

We can arrange a demo or a trial and answer your questions about Record Rules Base.

Contact us