Skip to Content
Menu
This question has been flagged
3 Replies
11570 Views

I'm a new user in ODOO 11 , I created a project by scaffold order and I add it in ODOO by


./odoo-bin --addons-path=addons,~/Desktop/odoo11/myaddons


But when I added a module in my main project folder named (test.py)  and update my app in ODOO

I found the next warning in terminal 

testdb odoo.modules.loading: The model openac.test has no access rules, consider adding one. E.g. access_openac_conf,access_openac_conf,model_openac_conf,base.group_user,1,0,0,0


Please , How can I solve this problem and how can I adjust access rules for my modules?

Regards


Avatar
Discard
Best Answer

Hi,

As stated in the warning message you can add a file inside the security folder named ir.model.access.csv, inside the file copy the line in the warning message you got


access_openac_conf,access_openac_conf,model_openac_conf,base.group_user,1,0,0,0


Also, specify this file in the manifest file.

Thanks

Avatar
Discard
Author Best Answer

Hi Guys

Thanks for your reply . I faced the same problem .I created another module in this path

~/Documents/Projects/tutorial/addons/modl1

then I created xml file in the view folder named customer.xml

and added this line in __manifest__.py  under 'data'

'security/ir.model.access.csv',

and added this line in ir.model.access.csv by differents way as following

access_modl1_modl1,modl1.modl1,model_modl1_modl1,base.group_user,1,1,1,0   

access_customer_customer_emp,customer.customer,model_customer_customer,base.group_user,1,1,1,0

but when install in odoo I got this error message in odoo 

Exception: Module loading modl1 failed: file modl1/security/ir.model.access.csv could not be processed:
 No matching record found for external id 'model_modl1_modl1' in field 'Object' 

or

Exception: Module loading modl1 failed: file modl1/security/ir.model.access.csv could not be processed:
 No matching record found for external id 'model_customer_customer' in field 'Object'
Missing required value for the field 'Object' (model_id)

Thanks for your helpful

Avatar
Discard
Best Answer

Hello Mohamed,

you have to pass access rights through csv or xml. see the bellow example for csv

this csv file you have add on __manifest__.py file



Avatar
Discard