<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="view_order_form_planner" model="ir.ui.view">
        <field name="name">sale.order.form.planner</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_order_form" />
        <field name="arch" type="xml">
            <xpath expr="//header/button[@name='action_confirm']" position="before">
                <button name="action_planorder"
                        type="object"
                        attrs="{'invisible': [('state', 'not in', ('draft'))]}"
                        string="Plan"
                        class="oe_highlight"/>
            </xpath>
        </field>
    </record>
</odoo>