This question has been flagged
2 Replies
4501 Views

Is it possible to suppress the possibility for an employee to seize timesheet for another employee ? I'd like to maintain this functionnality only for the HR Manager / Officer groups. Thanks

Avatar
Discard
Best Answer

On the group, you can create a rule to give users access to its timesheet only: [('user_id', '=', user.id)]

There is already the same rule set on the Employee group.

Avatar
Discard
Best Answer

The default rule is just set for the object "hr.analytic.timesheet".

If you want to block a user from entering the timesheet for another user in the view "Time Tracking > My Current Timesheet" you have to create a new rule under Settings > Technical > Security > Record Rules: - Object: hr_timesheet_sheet.sheet - Access rights: Apply for Read / Write / Create / Delete - Rule definition: [('user_id', '=', user.id)] - Groups: Human Resources / Employee

If you want to let the HR Manager to enter timesheets for any user with the same menu, you have to create a similar rule with rule definition [(1, '=', 1)] and group Human Resources / Manager.

Avatar
Discard

Thank you for your response. I tried this but when i log in as an employee, i continue to have the possibility to select another employee and enter timesheet for the selected employee, although i restarted openerp. I'm using openerp v7

I apologize. I can enter timesheet for another employee on the screen but cannot validate. Is it then possible to restrict the possibility of selecting another employee in the select box ?