Skip to Content
Menu
This question has been flagged
2 Replies
1134 Views

Hi, im using odoo18, and i created a new module named formation. And i added this security but i got the error "Missing required value for the field 'Object' (model_id)" when i import the module to odoo. 


id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

access_formation_courses,formation.courses,model_formation_courses,base.group_user,1,1,1,1

access_formation_trainers,formation.trainers,model_formation_trainers,base.group_user,1,1,1,1

access_formation_worker,formation.worker,model_formation_worker,base.group_user,1,1,1,1

access_training_action,training.action,model_training_action,base.group_user,1,1,1,1


The models are named: 

 _name = 'formation_courses'

_name = 'formation_worker'

_name = 'formation_trainers'

_name = 'training_action'


Thanks for your help in advance!

Avatar
Discard
Best Answer

Hi,
Can you confirm that the file containing the models are imported in the init file and service is restarted after adding the models ? Ensuring the above may solve the issue. 

Right now the system is not able to see the models in the env and thus exception is raised.
Thanks

Avatar
Discard
Best Answer

Hi,

First, make sure the model is loaded. You can check this in the Settings->Technical-> Models. Also, ensure that you've added the model's file name in the __init__.py file inside the models folder. 

Similarly, make sure the models folder is added in the main __init__.py file.

Please check the following blog or more details:

https://www.cybrosys.com/blog/how-to-create-security-group-and-manage-access-rights-in-odoo-18


Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 15
5197
1
Feb 25
1107
1
Jul 22
7370
0
Nov 16
5263
2
Mar 15
6638