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

Hello Odoo masterss, I'm currently using Odoo8 and I'm wondering whether i can remove the "Delete" function inside "More" button in back-end and by specific role?

Hope to remove all "Delete" function from that role.
(X) I've tried set rules through back-end for that particular user, even at the front-end appeared the new rule that I've created but the "Delete" button still there and functioning.

Please thankyou.

Urgent.

아바타
취소
베스트 답변

Simply Use the Delete attribute in form Tag

<form string="Registration Form" delete="false">
​<tree string="Registration Tree View" delete="false">

If it's work for you Please 1+ vote :)

아바타
취소

Works on v10, thank you.

베스트 답변

Hello, through by code You can do it by writing security and access rights in csv 

<xpath expr="//tree" position="attributes">

    <attribute name="delete">false</attribute>

</xpath>


for group

<field name="groups_id"    eval="[(6, 0, [ref('account_delete.invoice_delete_group') ])]" />

<field name="arch" type="xml">

<xpath expr="//form" position="attributes">

<attribute name="delete">true</attribute>

</xpath>

</field>

If you want to hide or show, inherit JS code of that button and then give condition to it.

아바타
취소
베스트 답변

Hi,

Suppose if you have to remove the delete option from the purchase order for the users purchase user, then what you have to do is that, activate developer mode, then go to the menu, Groups under the settings, then search the group purchase user. Open it, then in the access rights tab, you can see different objects and given permission.


From this for the object Purchase order untick the delete access, then for this group of users there will not delete permission.



In above image you can see that the delete access have been removed.


Now when log in as purchase user,



In the action drop down , you cannot see the Delete button.


The image is of v10, still you can follow same in v8.


Thanks

아바타
취소
베스트 답변

thanks for the answer

아바타
취소
베스트 답변

I hope it helps:

<record id="partner_tree_no_delete" model="ir.ui.view">

    <field name="name">partner.tree.no.delete</field>

    <field name="model">res.partner</field>

    <field name="inherit_id" ref="base.view_partner_tree" />

    <field name="arch" type="xml">

        <xpath expr="//tree" position="attributes">

            <attribute name="delete">false</attribute>

        </xpath>

    </field>

</record>

아바타
취소