Skip to content

Commit c169c9d

Browse files
committed
[FIX] hr_timesheet : allow project managers to handle timesheets
Steps to reproduce: - Install project and timesheet - Create a project with settings "invited employees only" - Create a user with administrator project right (and non admin rights for timesheet) - Create a task in the new project - Try to generate a timesheet on the task with the new user (the user has to not follow the task) Current behavior: This generate an access error due to not respecting some rules Expected behavior: The timesheet is created Explanation: The project admin should be able to handle any timesheet that is linked to a project to do so we add its groupto the rule that gives access to the model analytic.model_account_analytic_line if there is a project_id. opw-2861042 closes odoo#94068 X-original-commit: 70a0ad2 Signed-off-by: Laurent Stukkens (ltu) <[email protected]>
1 parent 75030db commit c169c9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/hr_timesheet/security/hr_timesheet_security.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<field name="name">account.analytic.line.timesheet.manager</field>
8080
<field name="model_id" ref="analytic.model_account_analytic_line"/>
8181
<field name="domain_force">[('project_id', '!=', False)]</field>
82-
<field name="groups" eval="[(4, ref('group_timesheet_manager'))]"/>
82+
<field name="groups" eval="[(4, ref('group_timesheet_manager')), (4, ref('project.group_project_manager'))]"/>
8383
</record>
8484

8585
<record id="project.group_project_manager" model="res.groups">

0 commit comments

Comments
 (0)