admin管理员组

文章数量:1125319

I've created a record rule in Odoo 17 to allow users to view and manage timesheets for their entire department, but I'm encountering an issue with the employee selection field when creating new entries.

Current Setup

Model: account.analytic.line (Timesheet entries)

Record Rule Domain:

[('employee_id.department_id', '=', user.employee_id.department_id.id)]

Current Behavior

  • List view shows all timesheet entries from the user's department (working correctly)
  • When creating a new timesheet entry, the employee_id Many2one field only shows the current user
  • Cannot select other department members when creating/editing timesheets

Expected Behavior

  • Should be able to view AND select any employee from the same department when creating/editing timesheet entries

What I've Tried

  • Confirmed the record rule is working correctly for reading records
  • Verified that users have basic access rights for timesheet management

Question

What additional record rules or access rights do I need to configure to allow selecting any department employee in the employee_id field while maintaining department-level restrictions?

Technical Details

  • Odoo Version: 17.0
  • Model: account.analytic.line
  • Field in question: employee_id (Many2one relationship to hr.employee)

本文标签: