Go to file
2026-01-21 15:17:45 +07:00
models feat: Implement access restrictions for approval requests and add bypass_user_restriction context to various action methods across multiple models. 2026-01-21 15:17:45 +07:00
security feat: Extend user access restrictions to quality check buttons on manufacturing orders and stock pickings, and update domain handling for Odoo 19. 2026-01-16 09:01:05 +07:00
views Fix: Stop tracking __pycache__ files 2026-01-19 10:40:30 +07:00
__init__.py first commit 2026-01-05 12:03:16 +07:00
__manifest__.py Fix: Stop tracking __pycache__ files 2026-01-19 10:40:30 +07:00
.gitignore feat: Hide quality check buttons on manufacturing orders for specific user groups with exceptions for quality roles. 2026-01-19 10:32:23 +07:00
README.md feat: Implement user-specific control for quality check button visibility on manufacturing orders and inventory transfers via a new allowed_quality_checks field on users. 2026-01-19 10:32:49 +07:00

Access Restriction By User

This module allows administrators to restrict user access to specific records in Inventory, Manufacturing, and Approvals without using complex Record Rules.

Features

Restrict visibility of the following records based on User configuration:

  • Warehouses (stock.warehouse)
  • Picking Types (stock.picking.type)
  • Locations (stock.location)
  • Work Centers (mrp.workcenter)
  • Approval Categories (approval.category)
  • Quality Checks Button (on Manufacturing Orders and Inventory Transfers)

Configuration

  1. Navigate to Settings > Users & Companies > Users.
  2. Select the user you want to restrict.
  3. Go to the Access Restrictions tab.
  4. Add records to the following fields:
    • Allowed Warehouses
    • Allowed Picking Types
    • Allowed Locations
    • Allowed Work Centers
    • Allowed Approvals

Important Usage Notes

  • Empty List = Unrestricted: If an "Allowed" field is left empty for a user, they will have access to ALL records of that type.
  • Populated List = Restricted: If one or more records are added, the user will ONLY see those specific records.
  • Superuser: The Superuser (OdooBot) and administrators bypassing access rights are not affected by these restrictions.

Quality Checks Button Restriction

The visibility of the "Quality Checks" and "Quality Alert" buttons on Manufacturing Orders and Inventory Transfers is controlled by a specific user setting.

To allow a user to see these buttons:

  1. Navigate to Settings > Users & Companies > Users.
  2. Enable the checkbox "Is Allowed todo Quality Checks?" in the Access Restrictions tab.

By default, this setting is unchecked, meaning users will NOT see these buttons unless explicitly allowed.

Technical Details

This module overrides the _search method on the target models to apply a domain filter based on the current user's allowed list. This ensures consistency across views (list, kanban, many2one dropdowns) and avoids common issues associated with Record Rules.

Author

Suherdy Yacob