<odoo>
    <!--Invoice Form -->
    <record id="view_move_form_inherit_1" model="ir.ui.view">
        <field name="name">account.move.form.inherit</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form" />
        <field name="type">form</field>
        <field name="arch" type="xml">
            <button name="preview_invoice" position="before">
                <field name="is_avatax" invisible="1" />
                <button
                    name="avatax_compute_taxes"
                    type="object"
                    string="Compute Taxes"
                    attrs="{'invisible': ['|', ('is_avatax', '=', False), ('state', 'not in', ['draft'])]}"
                />
            </button>
            <group id="header_right_group" position="inside">
                <field name="hide_exemption" invisible="1" />
                <!-- Non editable Exemptions -->
                <field
                    name="exemption_code"
                    readonly="1"
                    attrs="{'invisible': [('hide_exemption','=',True)]}"
                    groups="!account.group_account_manager"
                />
                <field
                    name="exemption_code_id"
                    readonly="1"
                    attrs="{'invisible': [('hide_exemption','=',True)]}"
                    groups="!account.group_account_manager"
                />
                <!-- Editable Exemptions -->
                <field
                    name="exemption_code"
                    attrs="{'invisible': [('hide_exemption','=',True)]}"
                    groups="account.group_account_manager"
                />
                <field
                    name="exemption_code_id"
                    attrs="{'invisible': [('hide_exemption','=',True)]}"
                    groups="account.group_account_manager"
                />

                <field name="location_code" />
                <field
                    name="tax_on_shipping_address"
                    attrs="{'invisible': [('hide_exemption','=',True)]}"
                />
            </group>
            <field name="invoice_incoterm_id" position="before">
                <field
                    name="warehouse_id"
                    options="{'no_create': True}"
                    groups="stock.group_stock_multi_warehouses"
                />
                <field name="tax_address_id" />
                <field name="calculate_tax_on_save" invisible="1" />
                <field
                    name="invoice_doc_no"
                    attrs="{'invisible': [('move_type','!=','out_refund')]}"
                />
            </field>
            <xpath expr="//field[@name='partner_shipping_id']" position="after">
                <field name="so_partner_id" readonly="1" />
            </xpath>
            <field position="after" name="fiscal_position_id">
                <field name="is_avatax" groups="base.group_no_one" />
            </field>
            <notebook position="inside">
                <page
                    name="avatax_page"
                    string="Avatax Log"
                    groups="base.group_no_one"
                    attrs="{'invisible': [('is_avatax', '=', False)]}"
                >
                    <label for="avatax_request_log" />
                    <field name="avatax_request_log" widget="ace" />
                    <label for="avatax_response_log" />
                    <field name="avatax_response_log" widget="ace" />
                </page>
            </notebook>
        </field>
    </record>
</odoo>
