want to create a filter with employee Name that fetch record related to currently logged user
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
2
Replies
5926
Views
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:
Odoo Server Error - Access Error
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.
(Document type: hr.employee, Operation: read)
due to hr_org_chart app, it works properly by uninstalling hr_org_chart app. But we need this app also.
(Document type: hr.employee, Operation: read)
due to hr_org_chart app, it works properly by uninstalling hr_org_chart app. But we need this app also.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Nov 18
|
2199 | ||
|
2
Nov 23
|
1211 | ||
|
1
Dec 21
|
9645 | ||
|
2
Apr 24
|
2092 | ||
|
7
Apr 21
|
18379 |