<?xml version="1.0"?>
<data><xpath expr="//group[@name='sale_info_group']/field[@name='invoice_user_id']" position="after">
                <field name="team_id" context="{'kanban_view_ref': 'sales_team.crm_team_view_kanban'}"/>
            </xpath>
            <xpath expr="//group[@id='other_tab_group']" position="inside">
                <group string="Marketing" name="utm_link" groups="base.group_no_one" invisible="move_type not in ('out_invoice', 'out_refund')">
                    <field name="campaign_id" options="{'create_name_field': 'title'}"/>
                    <field name="medium_id"/>
                    <field name="source_id"/>
                </group>
            </xpath>
            <xpath expr="//div[@name='button_box']" position="inside">
                <button class="oe_stat_button" name="action_view_source_sale_orders" type="object" icon="fa-pencil-square-o" invisible="sale_order_count == 0 or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')">
                    <field string="Sale Orders" name="sale_order_count" widget="statinfo"/>
                </button>
            </xpath>
            <xpath expr="//field[@name='invoice_line_ids']/list" position="inside">
                <field name="is_downpayment" column_invisible="1"/>
            </xpath>
            <xpath expr="//field[@name='invoice_line_ids']/list/field[@name='product_id']" position="attributes">
                <attribute name="readonly">is_downpayment</attribute>
            </xpath>
            <header position="after">
                <div class="alert alert-warning" role="alert" invisible="not sale_warning_text or move_type != 'out_invoice'">
                    <field name="sale_warning_text" class="fw-bold"/>
                </div>
            </header>
            <list name="journal_items" position="attributes">
                <attribute name="decoration-warning" add="(sale_line_warn_msg and move_type == 'out_invoice')" separator=" or "/>
            </list>
        </data>