콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4682 화면

Dear all,

Hope you are fine all of you 

i did new module in odoo 11 & how i can show new module in Application Accesses to give users permission (read - write - delete) or (user - officer - manager)

plz i need help !!!!!

Thanks & Best Regards 

Hazem

아바타
취소
베스트 답변

Hello

Make a folder in your app named 'security'. In the security folder create a file called ir.model.access.csv. Inside it

 

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

your_first_access_right_id,your access right name,model_your_app_folder_name,hr.group_hr_manager,1,1,1,1

your_sec_access_right_id,your access right name,model_your_app_folder_name,hr.group_hr_user,1,1,0,0

your_third_access_right_id,your access right name,model_your_app_folder_name,base.group_user,1,0,0,0


This will give all employees read access, officers read and write access, all managers read, write, create and delete access rights. Add this file in your manifest. restart and upgrade.

Here we used existing odoo groups employee,officer,manager(base.group_user, hr.group_hr_user, hr.group_hr_manager resp).

If you need to create new groups for your model, refer yenthe's blog 

https://www.odoo.yenthevg.com/creating-security-groups-odoo/


아바타
취소
베스트 답변

Hi,

If you have created new models and menus in your module you have to give them access rights so that only it will be visible for all users.

If you create any new menu add groups attribute with your menu and also give access rights for the models.

<menuitem id="abcd" name="Test" parent="tst_id" action="test_action" 
groups="base.user_group"/>

Also, give access rights for the model, check this link: https://www.odoo.com/documentation/10.0/reference/security.html


Thanks

아바타
취소