<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <!-- Inherit Table Form View -->
    <record id="view_restaurant_table_form_inherit" model="ir.ui.view">
        <field name="name">restaurant.table.form.inherit</field>
        <field name="model">restaurant.table</field>
        <field name="inherit_id" ref="pos_restaurant.view_restaurant_table_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='seats']" position="after">
                <group string="Reservation Settings" name="reservation_settings">
                    <field name="is_reservation_enabled"/>
                    <field name="reservation_slot_duration"/>
                    <field name="min_party_size"/>
                    <field name="max_party_size"/>
                    <field name="zone"/>
                </group>
            </xpath>
        </field>
    </record>

    <!-- Specific List View for Reservation Settings -->
    <record id="view_restaurant_table_tree_reservation_settings" model="ir.ui.view">
        <field name="name">restaurant.table.tree.reservation.settings</field>
        <field name="model">restaurant.table</field>
        <field name="arch" type="xml">
            <tree editable="bottom">
                <field name="floor_id"/>
                <field name="name"/>
                <field name="seats"/>
                <field name="is_reservation_enabled"/>
                <field name="reservation_slot_duration"/>
                <field name="min_party_size"/>
                <field name="max_party_size"/>
                <field name="zone"/>
            </tree>
        </field>
    </record>

    <!-- Action for Reservation Settings -->
    <record id="action_restaurant_table_reservation_settings" model="ir.actions.act_window">
        <field name="name">Reservation Settings</field>
        <field name="res_model">restaurant.table</field>
        <field name="view_mode">tree,form</field>
        <field name="view_id" ref="view_restaurant_table_tree_reservation_settings"/>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                Configure your tables for reservation.
            </p>
        </field>
    </record>
</odoo>
