Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
6777 มุมมอง
I want to remove the top "Save" button from the formview of my custom module.because i want create action with my custom button I know that we perform this by setting write/create to false in the XML,but button still appear
 my form view :
<field name="name">sales_inquiry</field>
<field name="model">sales_report_custom.sales_inquiry</field>
<field name="type">form</field> <field name="arch" type="xml">
<form create="false" edit="false" string="Sales Inquiry" version="7.0" >
<button string="View" name="action_open_form_report" type="object" class="btn-primary" /> </sheet>
</form>
</field>

my action : 

<record id="action_salesinquiry_list" model="ir.actions.act_window">
<field name="name">Sales Results Inquiry</field>
<field name="res_model">sales_report_custom.sales_inquiry</field>
<field name="view_id" ref="sales_results_form" />
<field name="target">current</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>

Do you have an idea ? Thanks!
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Set those property like create="false" edit="false" in Tree view itself, that will eliminate rest of the things,


Suppose if you are loading the view from py method,  then you set the flags on a return action

'flags': {'form': {'action_buttons': False}}

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


Hi Wendra,

  kindly replace  "target" mode for action to "inline" and update module.

<field name="target">inline</field> 

ps: pls add option: create='false' into form view which you want remove button.
<form create="false" >




อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 15
4049
2
ก.ค. 23
784
2
ม.ค. 22
48138
1
ต.ค. 24
1683
Non-dict expression แก้ไขแล้ว
2
ก.ค. 22
2878