تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
7586 أدوات العرض

Hie,

How to create rule to display only subordinates leave records in openerp

Example, Ram is Manager of A,B,C, Employees John is Manager of X,Y,Z, Employees

Ram and John Has related users with Access Rights Officer/Manager

If Ram Is logged in He can Approve Leave Request, Approve Timesheet of X,Y,Z employees also,

Default Functinality:

   Default Rule for Human Resource Officer is for Leaveor hr_holidays is [(1=1)]

I tried with following Rule

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

But This will not work Help me to resolve this issue

Thank You In ADVNC :)

الصورة الرمزية
إهمال

I am facing the same issue. Any updates ?

i did test this and works fine, so make sure again that you are applying record rule on leave object.

@Turky, It worked. Thank you.

But the HR/Officer users can apply and approve their on leave request. Is there anyway we can restrict that ?

أفضل إجابة

Use the module community hr.holidays.extension

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أكتوبر 21
7117
1
مايو 18
15695
1
يوليو 15
4167
0
نوفمبر 16
3271
3
فبراير 16
5994