<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="view_order_form_inherit" model="ir.ui.view">
        <field name="name">sale.order.form.inherit</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="after">
                <button name="%(action_sale_line_change_order)d"
                        type="action"
                        attrs="{'invisible': [('state', 'in', ('draft', 'sent', 'cancel'))]}"
                        string="Line Change"
                        class="btn-secondary"
                        context="{'default_order_id': active_id}"
                        groups="sales_team.group_sale_manager"/>
            </xpath>
        </field>
    </record>
</odoo>