Skip to Content
Menu
This question has been flagged
2 Replies
5926 Views

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

Avatar
Discard
Best Answer

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

Avatar
Discard
Author Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
0
Nov 18
2199
2
Nov 23
1211
1
Dec 21
9645
2
Apr 24
2092
7
Apr 21
18379