Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Why does this security rule not work? (No matching record found for external id 'model_project_project')
I have a strange issue regarding a new security rule that I've added.
Under __openerp__.py I added a dependency to the following modules:
'depends': ['website_portal', 'project_issue', 'website_project_issue', 'project']
I then created a new CSV for the security rules (named ir.model.access.csv) with the following rule:
When I now try to install / update the module I will get the following error:
"access_project_project_public_access","Public user access to project.project","model_project_project","base.group_portal",1,1,1,0
Why do I get this? I have a dependency on the project module, it is installed and a very similar security rule for project.issue works fine:
Exception: Module loading my_custom_module failed: file my_custom_module/security/ir.model.access.csv could not be processed:
Line 4 : No matching record found for external id 'model_project_project' in field 'Object'
access_project_issue_public_access","Public user access to project.issue","model_project_issue","base.group_portal",1,1,1,
So what is wrong with this?
If the model it's not defined in the same module of the ir.model.access.csv then you need to specify the module when defining the security line,
like in the module portal_project:
For your case is the same:
"access_project_project_public_access","Public user access to project.project","project.model_project_project","base.group_portal",1,1,1,0
Also the "..." are not necessary, the separator is the comma
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 2/10/16, 4:23 AM|
|Seen: 2372 times|
|Last updated: 5/3/16, 4:38 AM|