I am looking to create a filter that will let me reference the current logged-in user and show records that belong to them?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
This would depend on the model on which you are working, but the field to reference in such cases would be the " user_id". Please check if the user_id field exists in the model before creating the filter for the model.
As an example let's take the CRM app and create a filter that will display the opportunities that belong to the logged in user:
So the filter will be created as follows:
[("user_id", "=", uid)]
Where user_id is the Salesperson field on the opportunity and "uid" refers to the id of the logged in user.
This filter will only show opportunities that belong to the logged-in salesperson.
Similarly, if you have a user_id field in other models, we can create a similar filter referencing it.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 9 24
|
674 | ||
|
1
thg 9 24
|
941 | ||
|
1
thg 4 25
|
419 | ||
|
1
thg 4 25
|
507 | ||
|
1
thg 4 25
|
635 |