Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
6 Antwoorden
16823 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer

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.

Beste antwoord

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

Avatar
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer

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 :)

Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 25
1001
2
dec. 22
4784
0
dec. 17
3681
6
jun. 17
10949
1
mrt. 15
4471