Skip to Content
Menu
This question has been flagged
2 Replies
7178 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
2952
1
Jun 25
11000
2
Nov 23
3171
2
Apr 24
2907
7
Apr 21
20550