<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="loyalty_card_view_form_inherit_sale_loyalty" model="ir.ui.view">
        <field name="name">loyalty.card.view.form.inherit.sale.loyalty</field>
        <field name="model">loyalty.card</field>
        <field name="inherit_id" ref="loyalty.loyalty_card_view_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='partner_id']" position="after">
                <field name="order_id" readonly="1" attrs="{'invisible': [('order_id', '=', False)]}" />
            </xpath>
        </field>
    </record>
</odoo>
