Saturday, August 31, 2024
1 change
Resolved issues and error corrections
This update resolves multiple access permission issues in the timesheet system that were preventing users from creating timesheets and validating entries. Users with standard project access can now start timesheets from tasks without encountering permission errors, FSM projects are properly restricted from quick creation, and timesheet validation now works correctly for employees without assigned managers.
Original PR description
When a user with 'user' access rigths on the project module that is also assigned to a task of an internal project, it will prevent the user from creating a new timesheet from the timesheet grid.…
When a user with 'user' access rigths on the project module that is also assigned to a task of an internal project, it will prevent the user from creating a new timesheet from the timesheet grid. This bug is due to the fact that when a user clicks on the line of the task, some rpc's call are made on the 'project' model. Since the user does not have access rigth to the internal project on which the call are made, an access rigth error is raised. Step to reproduce: - create a db with hr_timesheet installed - have a user with 'user' access rights on project and 'own timesheet' on timesheet - create an internal project - create a task inside that internal project and assigned the user on it - connect with the other user - open timesheet app - select the task from the internal project to start a new timesheet timer - an error access right on 'project' is triggered Solution: Add a sudo inside the python method 'check can start timer'. Give the project name to the timerHeaderM2O, to prevent the call to the name_get on the project. task - 3922511 affected version 16.0 - master Forward-Port-Of: odoo/enterprise#63159