Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Unable to remove button save/cancel on header form (odoo 9)

By
Wendra
on 11/9/16, 11:54 PM 129 views
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!
0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 11/10/16, 1:27 AM

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}}

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/9/16, 11:54 PM
Seen: 129 times
Last updated: 11/10/16, 1:27 AM