Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
7198 Vistas

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

Avatar
Descartar
Mejor respuesta

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
Descartar
Autor Mejor respuesta

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
nov 18
2964
1
jun 25
11033
2
nov 23
3198
2
abr 24
2925
7
abr 21
20610