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

want to create a filter with employee Name that fetch record related to currently logged user

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

There is a lot of samples of the same in Odoo code itself.

See one among them,

<filter string="My Requests" name="my_requests" 
domain="['|', ('employee_id.user_id', '=', uid), ('department_id.manager_id.user_id', '=', uid)]"/>

In the uid you will get the id of the logged in user, by which you can compare the field in the record.


Thanks

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

it works .. mean show only logged users record but when I'm click on record it gives an error:

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
نوفمبر 18
2955
1
يونيو 25
11006
2
نوفمبر 23
3188
2
أبريل 24
2917
7
أبريل 21
20578