Reporting Manager can approving their leaves. How to restrict this option. Reporting Manager should approve/reject his team’s leave but his leave should only be approved/rejected by his Reporting Manager. We have multi level Hierarchy. We are using 11 version.
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,
There are some modules available in the store for preventing the same, but they seems to be paid. If you are ready you can check it out. Otherwise you can enable the double approval for the leaves and restrict this criteria.
Other option is to do some custom code and override the action of the approval button and compare the logged in user and check the requesting user and raise warning if both are same.
Python code:
class HRLeave(models.Model):
_inherit = 'hr.leave'
@api.multi
def action_approve(self):
res = super(HRLeave,self).action_approve()
# do the coding here to check the user and requested employee and raise warning
return res
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 | |
---|---|---|---|---|
|
1
thg 2 20
|
2990 | ||
|
2
thg 2 22
|
5141 | ||
|
1
thg 11 19
|
4100 | ||
|
3
thg 6 18
|
10493 | ||
|
1
thg 6 16
|
9095 |
Which version of Odoo are you using? This was addressed at v12. See https://github.com/odoo/odoo/pull/19270/files
Hi Niyas, Where I have to put this code exactly, Could you please elaborate, I new to the odoo.