Skip to Content
Menu
This question has been flagged
6 Replies
14569 Views

I am using Odoo 11.

Currently employees within the "Manual Attendance" group can only check in and out, but they cannot get any kind of report of their own attendance history. I could not find a way to enable it.

Can it be configured anywhere? Or should I write a module?

Avatar
Discard
Best Answer

Hi,
To view the attendance of their own  for the employees, first what we have to do is that, make the menu Attendance under the Manage attendance menu should be visible for the employees.


To make this menu visible for the employee,  activate the developer mode and navigate to Settings -> Technical -> User Interface -> Menu items,

then search the menu named Manage attendance and its sub menu Attendance , Open the record and add the group employee in the access right page. Do the process for the both the menu's.


Once for the both menus the group employee is added , then the users can see the menu named Attendance.


Now the problem is that the employees can see the attendance of other employees too. So we have to restrict it. For restricting it, we have to add a record rule to overcome it.


Navigate to Settings -> Technical -> Security -> Record Rules, then create a new rule.

Select the object as Attendance, in the group section add group employees into it.

Then in the rule definition add this line,

['|',('employee_id.user_id','=',user.id),('employee_id.user_id','=',False)]


Thanks


Avatar
Discard

AFAIK Manual Attendance includes create and write access rights, so by adding a the menu, would employees be able to edit the records whenever they want, right?

That may be an issue to keep a trusted record. That said, it is a great tip, thanks for sharing.

Right now itself , that system not trusted, as the employee can access the system from anywhere and put the attendance as per his need.

Best Answer

Thank you very much, that helped me a lot and works like a charm.

Avatar
Discard
Best Answer

it's work but when i use server action there have another problem in attendance form view, id change and press it should not work but it work. This id is another employee attendance id.

How to fixed in odoo v12





Avatar
Discard
Best Answer

hii niyas raphy
i just create a new record rule with that and assign groups to it.


['|',('employee_id.user_id','=',user.id),('employee_id.user_id','=',False)]

by applying that rule he can see his own attendance only.thats great

bt i need, 

i have 2 company with there employees,suppose user1 is under company1 and company1 have one adminA other than super admin.

when admin1 logged in they also want to see the attendance of employee1(both the employee1,admin1 want to see employee1 attendance) bt now only employee1 can see his attendance,what changes are need to get this answer.

Avatar
Discard
Best Answer

Turns out there is a very easy way to do it.  Using an admin account click Attendances >> Employees >> Pick an Employee >> Attendance.  Now you should see a list of attendances.  Copy that URL.  It will look something like this though the domain & user id will be different:  http://yoursite.com/web#view_type=list&model=hr.attendance&action=439&active_id=000


Now, log out and log in as that user that you've picked.  Even without additional credentials, you will be able to see all of the attendances.  That user (if they are not an officer or an admin) will not be able to see the attendances of other users.


 

Avatar
Discard
Best Answer

Probably no need some additional access rights, user can see own attendances from employee form. User open their own employee form and where from stat button 'Attendances' he/she can see their own all attendances.


Avatar
Discard

Hi,

So for the users having the group manual attendance and employee can see their own attendance ? I think for that the user must have the group officer in attendance

Opps... You are right... I am not expecting this... At least user with "Manual Attendances" can see own attendances...

Yes, a little improvement that Odoo can make :)

Related Posts Replies Views Activity
2
Dec 22
3261
0
Dec 17
2669
6
Jun 17
9690
1
Mar 15
3569
1
Dec 24
67