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

replace header button on sale order form

By
naitsir
on 4/9/14, 12:09 AM 408 views

Hi, i have a problem to remove the 'action_quotation_send' button from the header of sale order form

<record id="view_order_form" model="ir.ui.view">
        <field name="name">sale.order.form</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <form string="Sales Order" version="7.0">
                <header>
                ....
                <button name="action_quotation_send" string="Send by Email" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
                <button name="action_quotation_send" string="Send by Email" type="object" states="sent,progress,manual" groups="base.group_user"/>
                ....

this is the code that I try to use to delete this two buttons from the header

<record model="ir.ui.view" id="view_order_form_ceo">
    <field name="name">view_order_form_ceo</field>
    <field name="model">sale.order</field>
    <field name="inherit_id" ref="sale.view_order_form"/>
    <field name="arch" type="xml">
        <data>
            <!--
            <button name="action_quotation_send" position="replace" />

            <xpath expr="/form/header/button[@name='action_quotation_send']"
            position="replace" />
            -->
            <button name="action_quotation_send" position="attributes">
                <attribute name="invisible">1</attribute>
            </button>
        </data>
    </field>
</record>

none of the three options work

what is the code to remove this buttons from the view!!! I'm going crazy trying to do that.

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

0 follower(s)

Stats

Asked: 4/9/14, 12:09 AM
Seen: 408 times
Last updated: 3/16/15, 8:10 AM