Employee Manager must be able to read, write and create only their own team's Leave, Expense, Loan and Salary Advance data
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ờ
Hi Krithika,
You can add record rules to the corresponding models so that employee manager can see records of his team only. The below rule should help you to achieve your requirement.
with hr.employee as the Object model,
['|',('user_id','=',user.id),('parent_id.user_id','=',user.id)]
Furthermore you can display the details of people who belongs to his department only.
[('department_id.member_ids.user_id', '=', user.id)]
Hello, do you have a solution like this one for sales team leader?
Hi,
For the Model Leave you can write a record rule to restrict the visibility of the records to his own team. For that create a record rule with the domain.
['|', ('employee_id.leave_manager_id', '=' , user.id), ('employee_id.parent_id.user_id', '=' , user.id)]
You can apply the above domain for the Leave model, once everything is fine for that model, similar concept you can implement for the other models too. Sometime you may have to alter some changes to the existing rules too.
For more info and examples of the rules in the leave model, you can have a look at this file: https://github.com/odoo/odoo/blob/master/addons/hr_holidays/security/hr_holidays_security.xml
Thanks
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 | |
---|---|---|---|---|
Odoo Mail Sending Limit
Đã xử lý
|
|
2
thg 12 23
|
15020 | |
|
0
thg 10 23
|
33 | ||
|
3
thg 10 23
|
790 | ||
|
1
thg 10 23
|
569 | ||
|
1
thg 8 23
|
2620 |
add a record rule