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

I created two action for same objects using 5,0,0 but in the second view I want to hide the create and edit button in tree and form view.

Is there any other way?

아바타
취소
베스트 답변

Hi Nivas M,

Try adding the below context in your second action,

<field name="context">{'edit': 0,'create': 0}</field>
Eg:

<record id="action_resignation_stages" model="ir.actions.act_window">
<field name="name">Overview</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.resignation.stage</field>
<field name="view_mode">kanban</field>
<field name="context">{'edit': 0,'create': 0}</field>
</record>

Hope it Helps,
Kiran K

아바타
취소
베스트 답변

Use 

<field name="context">{'create':False,'edit':False}field>

It will hide create and edit option in all the views in the action.

아바타
취소

Suspect karma faking detected for the user !!

베스트 답변

you can do this for tree and form view

<form string="new form" create="false" edit="false">
                    <field name="name"/>
                </form>


아바타
취소
작성자

Hi Sahar,
This will hide create and edit button in both menus.
I used same form view in two different actions and I want to hide create and edit buttons only in second action form view alone not in first action form view.
Is there any other way?

관련 게시물 답글 화면 활동
1
7월 25
2399
2
7월 25
7889
2
7월 25
4295
2
7월 25
4031
2
6월 25
2650