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??
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Knjigovodstvo
- Zaloga
- PoS
- Projekt
- MRP
This question has been flagged
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
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"

Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Prijavi| Related Posts | Odgovori | Prikazi | Aktivnost | |
|---|---|---|---|---|
|
|
0
dec. 24
|
1506 | ||
|
|
1
nov. 25
|
365 | ||
|
|
1
nov. 25
|
1604 | ||
|
|
1
nov. 25
|
614 | ||
|
|
2
sep. 25
|
3402 |