To overwrite ACL permission in Odoo, you have to overwrite id of that ACL record. For example by default in Employee Appraisals module Human Resource/ Officer user group is given full permissions as follow.
id - access_survey_page_hr_user
name - survey.page.hr.user
model_id:id - survey.model_survey_page
group_id:id - base.group_hr_user
perm_read - 1
perm_write - 1
perm_create - 1
perm_unlink - 1
and later in your customized module you decide to revoke unlink permission for that user group you have to just keep exact id and change permissions section. ACL record will be as follow:
id - access_survey_page_hr_user
name - survey.page.hr.user
model_id:id - survey.model_survey_page
group_id:id - base.group_hr_user
perm_read - 1
perm_write - 1
perm_create - 1
perm_unlink - 0
Hopefully it will help someone.
Thanks!!!!!!!!!!!!! Enjoy Programming :)
Reference Link:
https://bugs.launchpad.net/openobject-server/+bug/944561
id - access_survey_page_hr_user
name - survey.page.hr.user
model_id:id - survey.model_survey_page
group_id:id - base.group_hr_user
perm_read - 1
perm_write - 1
perm_create - 1
perm_unlink - 1
and later in your customized module you decide to revoke unlink permission for that user group you have to just keep exact id and change permissions section. ACL record will be as follow:
id - access_survey_page_hr_user
name - survey.page.hr.user
model_id:id - survey.model_survey_page
group_id:id - base.group_hr_user
perm_read - 1
perm_write - 1
perm_create - 1
perm_unlink - 0
Hopefully it will help someone.
Thanks!!!!!!!!!!!!! Enjoy Programming :)
Reference Link:
https://bugs.launchpad.net/openobject-server/+bug/944561
Comments
Post a Comment
Thanks for your valuable comments.