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

I have 2 user group in my custom module.
example


<record model="ir.module.category" id="module_category_dsr">

        <field name="name">DSR</field>

        <field name="sequence">11</field

</record>


record id="group_dsr_manager" model="res.groups">
    <field name="name">Manager</field>
    <field name="category_id" ref="lmc_crm.module_category_dsr"/>
    <field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

<record id="group_dsr_user" model="res.groups">
    <field name="name">User</field>
    <field name="category_id" ref="lmc_crm.module_category_dsr"/> 

</record>

in ir.ui.model.security I set perm_read is 0.That time administrator can delete the records.Other users can't.

Question

How to set the only manager have to permission to delete records in this module?

아바타
취소

Group and Access Rights in Odoo: https://goo.gl/4jAhtH

베스트 답변

Hi,

For this you can add a access control/ csv like this,

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
id_for_the_manager_access,manager_record_name,module_name.model_name,manager_group_name,1,1,1,1
id_for_the_user_access_record,user_record_name,module_name.model_name,user_group_name,1,1,1,0

Add this file in Security folder and give it in manifest file

Thanks

아바타
취소
작성자

Thanks niyas

베스트 답변

The most significant area in Odoo/OpenERP is how to deal or manage users. Managing users and assigning groups or role is the key point in every business. In Odoo/OpenERP assigning role or group to the single user is made through Administrator. And its not a good practice to do so using login through admin and do some setting stuff like assigning groups to employee or users.

After assigning groups to individual users you may need to set access controls. Defining access control is what your users have right to do with your data. Remember access control belongs to your object. There are four type of Access Control List (ACL) in Odoo/ERP.

  1. Read access: members of the group can read the data in the object,

  2. Create access: members of the group can create a new record in the object,

  3. Write access: members of the group can modify the contents of records in the object,

  4. Delete access: members of the group can delete records from the object.

"access_controll_list_id","title/name of your ACL","model_your_model_name_goes_here","module_name.group_name_goes_here",1,1,1,1

Read more in detail: http://learnopenerp.blogspot.com/2018/01/groups-and-access-rights-in-odoo.html

아바타
취소
관련 게시물 답글 화면 활동
5
6월 19
12596
3
3월 22
17400
1
7월 17
14594
0
3월 15
4246
0
3월 15
3806