Daily updates from Odoo
Wednesday, April 16, 2025
1 change
Security fixes and vulnerability patches
The Attendance Gantt view now hides employee names from users who are not authorized to manage or view them. This prevents misleading displays and reduces the risk of exposing restricted employee information, while HR officers and administrators retain full visibility.
Original PR description
### Issue: - In the Attendance Gantt view, users can see all employees in the company, including those they are not allowed to manage or view. - While access rules prevent users from seeing…
### Issue: - In the Attendance Gantt view, users can see all employees in the company, including those they are not allowed to manage or view. - While access rules prevent users from seeing attendance records for these employees, the employees' names still appear in the Gantt view as group headers. - This creates a misleading user experience and potentially exposes restricted information (employee names). ### Steps To Reproduce: 1. Log in as Marc Demo. 2. Open the attendance App. 3. Observe that all employees are shown as group headers. ### Solution: - Since Odoo 18.0, the `employee_id` field in `hr.attendance` was given a `group_expand='_read_group_employee_id'`. this method returns all employees in the allowed companies, without checking if the user actually manages them. - We updated the `group_expand` method `_read_group_employee_id` to restrict the list of employees shown in the Gantt view. Now, users will only see employees for whom they are set as the `attendance_manager_id`, unless they belong to the HR Officer group or are superusers, in which case they continue to see all employees. - This ensures that group headers in the Gantt view match the user's actual access rights. opw-4570867 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr