跳至内容
菜单
此问题已终结
6 回复
15689 查看

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?

形象
丢弃
最佳答案

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


形象
丢弃

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.

最佳答案

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

形象
丢弃
最佳答案

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





形象
丢弃
最佳答案

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.

形象
丢弃
最佳答案

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.


 

形象
丢弃
最佳答案

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.


形象
丢弃

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

相关帖文 回复 查看 活动
0
4月 25
247
2
12月 22
4007
0
12月 17
3118
6
6月 17
10265
1
3月 15
3959