Hello Community,
How to prevent a the users of an group from deleting (unlike) the customers(res.partners) record or any records , can we use XML , or access right or python ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello Community,
How to prevent a the users of an group from deleting (unlike) the customers(res.partners) record or any records , can we use XML , or access right or python ?
Hi MouBoum,
For this you have to use access right. To achieve this you can add a csv for that group with no delete permission, you can do it manually or by a custom module.
To do it manually activate the developer mode then go to, settings -> technical -> security -> access control list , then search the model res.partner then check whether your group have access right in that model, if so edit and change the permission such that delete permission is unticked . if not add a new csv for that group without delete permission.
By code you can add it like this,
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
view_res_partner,access_right_name,base.model_res_partner,group_name,1,1,1,0
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
4
mar 20
|
23694 | ||
|
0
cze 25
|
2331 | ||
|
0
mar 19
|
5516 | ||
HOW TO GET CURRENT LOGIN USER ID IN FIELD?
Rozwiązane
|
|
6
gru 23
|
112446 | |
|
1
lip 19
|
2644 |