<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="view_restaurant_table_form_inherit_self_order" model="ir.ui.view">
        <field name="name">restaurant.table.form.inherit.self.order</field>
        <field name="model">restaurant.table</field>
        <field name="inherit_id" ref="pos_restaurant.view_restaurant_table_form"/>
        <field name="arch" type="xml">
            <field name="seats" position="after">
                <field name="self_order_url" widget="url" readonly="1" string="Self-Order URL"/>
            </field>
            <xpath expr="//sheet" position="before">
                <header>
                    <button name="action_generate_qr_code" string="Open Front-end" type="object" class="btn-primary"/>
                </header>
            </xpath>
        </field>
    </record>

    <record id="view_restaurant_table_tree_self_order" model="ir.ui.view">
        <field name="name">restaurant.table.tree.self.order</field>
        <field name="model">restaurant.table</field>
        <field name="arch" type="xml">
            <tree string="Restaurant Tables">
                <field name="floor_id"/>
                <field name="name"/>
                <field name="seats"/>
                <field name="self_order_url" widget="url" readonly="1"/>
            </tree>
        </field>
    </record>
</odoo>
