Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
1668 Ansichten

Hi,

I created a module extending the account.move module by adding few fields and an action. This works perfectly. 

Now I would like to improve it by giving access for only a certain group of users because the database is used by multiples company so I wanted to create a group to add the users of the company that will be allowed to use this fields and action, and to hide them for all the other users.

So I wrote this code in my_module_security.xml

xml version="1.0" encoding="UTF-8" 
odoo
data
record
model="ir.module.category" id="my_module_management"
field
name="name" My module /field
field
name="description" Access my module /field
field
name="sequence" 10 /field
/record

record
id="my_module_user_access" model="res.groups"
field
name="name" Utilisateur /field
field
name="category_id" ref="my_module_management"/
/record
/data



id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_my_module,access.my.module,my_module.model_account_move,my_module_user_access,1,1,1,1

I also wrote the ir.model.access.csv file to give the permissions to this group and finaly, I added for all my fileds and button "groups=my_module_user_access".


When I want to go for example in the menu for out_invoice, I have an error : External ID "..." must be fully qualified.


Any help please ?


Regards,​


Sorry I am not allowed to add Screenshots

Avatar
Verwerfen

please attach the screenshot of your security.xml and CSV file for better understanding.

Autor

I edited my post I did my best to add the code and I'm not allowed to add images

Beste Antwort

Hii Le Bris Maxime,

->Whenever you are referring your group, you should do it with "YOUR_MODULE.YOUR_GROUP" but you have not mentioned your module name anywhere.

Please do it in following files/fields.

1).csv
2)All the fields/buttons in which you have assigned your group.

->Also in your group defination you have to refer the category_id with "YOUR_MODULE.YOUR_CATEGORY"

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Apr. 24
1398
1
Aug. 23
2941
1
Apr. 23
3106
0
Nov. 15
4887
1
März 15
5109