Hello, I am trying to add a special security group to an existing module using a custom module in order to restrict some functionalities to the user assigned this group.
However when i install the add on the module disappears from the access rights of users and can only show while in debug mode and instead of a drop down menu it shows as checkbox.
so what is the correct way to add a new security group to an existing module without altering the source code??
Câu hỏi này đã bị gắn cờ
Take a look at the Sales User (All Documents) group and you will see that it
- inherits the Sales User (Own Documents Only) group
- is inherited by the Sales Administrator group
This "chain" of three (or any number) of groups is what tells Odoo to display it as a dropdown. Otherwise each individual group has to be selected.
So your new group needs to be added into that "chain"

Hi,
To add a new security group to an existing Odoo module without altering its source code, create a custom module that extends the existing access rights rather than replacing them. Define your new security group in a groups.xml file with noupdate="1" to prevent issues during module updates.
In your ir.model.access.csv file, add new access rights records for your security group, referencing the existing access rights records from the target module using their XML IDs. This ensures that your new group has the desired permissions without affecting the existing access rights. Optionally, you can adjust views to hide specific fields or buttons based on the user's group membership. Remember to declare a dependency on the target module in your custom module's manifest.
Reference:-
* https://www.cybrosys.com/blog/how-to-create-security-group-and-manage-access-rights-in-odoo-18
* https://www.youtube.com/watch?v=uUznwThpLmc
Hope it helps
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 | |
|---|---|---|---|---|
|
|
0
thg 12 24
|
2372 | ||
|
|
1
thg 2 26
|
1233 | ||
|
Public holidays overlap restriction
Đã xử lý
|
|
1
thg 12 25
|
1145 | |
|
zoomOdoo is not a function
Đã xử lý
|
|
1
thg 2 26
|
1392 | |
|
|
0
thg 3 26
|
25 |
This is the limitation of the way that Odoo inherits the access rights to create a "chain".
If you need to have Segregation of Duties (e.g. one user enters the transaction, another user cannot enter but can approve) you will probably have to create one or more extra "technical" user access group(s) that do NOT belong to an application - or what Odoo calls a "privilege" in Odoo 19.