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

Hello, i have 2 views for same model, i want to remove create button from one of them, i tried to make 2 tree views and 2 form views, but didn't work
so for example i have a model and 2 menu items each menu item linked with action and each of the actions is linked with the model, so how can i remove create button from one of the views ?

thanks.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด


<record id="tree_view_customer_linked1234" model="ir.actions.act_window.view">

<field eval="31" name="sequence"/>

<field name="view_mode">tree</field>

<field name="view_id" ref="tree_id"/>

<field name="act_window_id" ref="action_id"/>

</record>

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

I think having 2 different Tree Views, linked with 2 different split-Action will achieve what you are trying to do.


In one of Tree View, set an attribute as create=false.


P.S. In case you don't want to have an split-Action or separate menu, then in fields_view_get ORM method control the views which are being loaded. In that you probably with the help of a flag, you can decide which Tree View to be loaded i.e a Tree View with Create Access and another one without it.

 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Add button to form view แก้ไขแล้ว
4
เม.ย. 24
62254
4
มิ.ย. 22
14977
0
มี.ค. 21
2302
0
พ.ค. 18
3318
1
พ.ย. 17
5057