Odoo Help

0

replace header button on sale order form

By
naitsir
on 4/9/14, 12:06 AM 658 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.

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

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