Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
9229 มุมมอง

I stuck with this problem in 3 days..please help me!! I want to hide edit button in form issue for any user. In this case , I want user only can create issue but can't edit any recorded issue. I have tried change in access control list and record rules but it's not working. I also have tried change access rights in models project.issue and unchecked write access for user. Then , user can't edit but also can't create. Any one can help me?thank you

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Try

 <form string="your_string" edit="false">
 <put_your_fields_here>
 </form>

Hope it will work.

Thanks

Sreedath

อวตาร
ละทิ้ง
ผู้เขียน

thank you for the answer..I have tried that..but the edit button is removed also for everyone...Do you know how to hide that button only for user then admin and manager still able to edit that record?

คำตอบที่ดีที่สุด

Hello Alvin,

You can create your own group and then try given xml code.

You need to pass your group in groups_id.

 <record id="view_issue_form_remove_edit" model="ir.ui.view">
        <field name="name">view.issue.form.remove.edit</field>
        <field name="model">project.issue</field>
        <field name="inherit_id" ref="project_issue.project_issue_form_view"/>
        <field name="groups_id" eval="[(6, 0, [ref('your_group')])]"/>
        <field name="arch" type="xml">
            <xpath expr="//form" position="attributes">
                <attribute name="edit">false</attribute>
            </xpath>
        </field>
    </record>

This will hide edit button for those users who belongs to new group.

Thank you

อวตาร
ละทิ้ง

it will not work for tree view.....any other option is you know for tree view ?

ผู้เขียน คำตอบที่ดีที่สุด

any1 can help me?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
5124
3
พ.ค. 15
15549
7
ธ.ค. 22
15459
4
ธ.ค. 23
24213
0
มี.ค. 15
4021