SmartERP Documentation An Ashewa Technology Solutions Platform

Row-Level Security and Dynamic Record Rules

Implementing ir.rule domain filters to partition records by department, branch, assigned salesperson, and confidentiality flags.

1. Overview & Business Value#

This comprehensive operational guide details the architecture, business workflows, configuration parameters, and execution steps for Row-Level Security and Dynamic Record Rules within SmartERP.

Module map showing dependencies between SmartERP Supply Chain Core, Tenders, Store Vouchers, Landed Costs, and WMS.
SmartERP Supply Chain and Sourcing architectural module map.

While model ACLs control whether a user can access a table, Record Rules (ir.rule) inject dynamic SQL WHERE clauses controlling exactly which rows a user can view or modify.

Record Rule Domain Example#

<record id="rule_sales_personal_leads" model="ir.rule">
    <field name="name">Salesperson: Own Leads Only</field>
    <field name="model_id" ref="model_crm_lead"/>
    <field name="domain_force">[('user_id', '=', user.id)]</field>
    <field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>

2. Prerequisites & Security Access Groups#

  • Required Modules: base, web, smarterp_security
  • Security Groups:
    • Enterprise Security Officer (Technical ID: base.group_user)
    • Security Administrator (Technical ID: base.group_system)
  • Master Data Dependencies: Established security group hierarchy, defined multi-company boundaries, and configured access control lists (ir.model.access.csv).

3. Step-by-Step Configuration & Execution#

Step 1: Navigating to the Interface#

  1. Log into your SmartERP instance at https://smarterp.et/odoo.
  2. Open the main App Switcher (grid icon in the top-left corner).
  3. Navigate to Settings → Technical.

Step 2: Operational Data Parameters & Controls#

Ensure all mandatory parameters comply with enterprise operational standards:

  • Authorized Operator: Action executed under assigned RBAC permissions (System Administrator, Certified Specialist).
  • Relational Integrity: Linked to upstream master records, approval requests, or transactional ledgers.
  • Statutory & Quality Controls: Verified against Ethiopian statutory regulations and corporate governance standards.

Step 3: Operational Execution & State Progression#

  • State Progression Gate: Advance record from Draft through Audited to Confirmed / Certified.
  • Integrated System Impact: Automatically updates real-time operational states and posts financial/inventory journal moves.
  • Audit Verification: System registers tamper-evident audit records logging user ID, timestamp, and cryptographic transaction digests.

4. Advanced Configuration Points#

  • Automated Actions & Scheduled Tasks (Crons):
    • Security: Audit log archival (base.ir_cron_audit_archive)
    • Security: Expire dormant sessions (base.ir_cron_session_expire)
  • Custom Print Templates & Reports:
    • Role-Based Access Control (RBAC) Security Matrix
    • System Security & User Activity Audit Dossier
  • Multi-Company Rules: Record-level security isolation under Company 1 (Ashewa Technology Solutions S.C.).

5. Comprehensive Troubleshooting Matrix#

Error Symptom / ExceptionProbable Root CauseCorrective Action / Resolution
Access Rights Error: Operation not allowedUser lacks required CRUD permission in ir.model.access.csv.Assign user to the corresponding operational security group under Settings → Users.
Record Rule Access Denied: Document outside company boundaryTarget record belongs to a company excluded by user profile.Add company to Allowed Companies or switch active company selector.
Two-Factor Authentication LockoutUser lost mobile 2FA device or time drift occurred.Reset user TOTP secret under User Preferences using administrator credentials.
Last updated: 2026-11-15