I am trying to create a custom addon in openerp v.7. I want to give read access rights to a group in my ir.model.access.csv:
test_access_hr_employee,test employee access,hr.employee,group_test_employee,1,0,0,0
test_access_hr_leave,test leave access,hr.holidays,group_test_employee,1,0,0,0
The first record for model hr.employee works fine, but when I add the second line for model hr.holidays I get the error Line 2 : No matching record found for external id 'hr.holidays' in field 'Object'
I have installed the leave management addon and I see the model hr.holidays in Technical - Database Structure - Models. Does anybody know why this happens?
As I know you should add the modul name in the permisson.
please see this, and just copy and modify what you want...:
- id = unique identify for the permission (Example: MY_MODULE_res_partner_manager)
- name = unique name for the permission (Example: res_partner manager)
- model_id/id = the model unique name of the class you want apply permission on (Example model_res_partner)
- group_id/id = group permission apply on (yopu can define it in xml group file or call an existing group with syntax module.group_id)
- perm_read,perm_write,perm_create,perm_unlink = the 4 values for the relative permission to read, write,create,unlink record on defined class. 1 is True (you can do this action) and 0 is Faslse (you can't)
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 7/22/14, 11:02 AM|
|Seen: 1768 times|
|Last updated: 3/16/15, 8:10 AM|