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 tohr.employee
)
本文标签:
版权声明:本文标题:Odoo 17: Record Rule Allows Viewing Department Timesheets but Employee Selection Limited to Current User - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736660317a1946381.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论