add reservation settings views and define base table form and tree layouts

This commit is contained in:
Alaguraj0361 2026-09-08 14:38:43 +05:30
parent 0ec1f7840d
commit 3a13d2b882
2 changed files with 16 additions and 7 deletions

View File

@ -6,7 +6,16 @@
<field name="model">restaurant.table</field> <field name="model">restaurant.table</field>
<field name="inherit_id" ref="pos_restaurant.view_restaurant_table_form"/> <field name="inherit_id" ref="pos_restaurant.view_restaurant_table_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='seats']" position="after"> <xpath expr="//field[@name='name']" position="before">
<field name="floor_id" options="{'no_create': True}" required="1"/>
</xpath>
<xpath expr="//field[@name='name']" position="attributes">
<attribute name="string">Table Name</attribute>
</xpath>
<xpath expr="//field[@name='seats']" position="attributes">
<attribute name="string">Seat Count</attribute>
</xpath>
<xpath expr="//sheet/group[1]" position="after">
<group string="Reservation Settings" name="reservation_settings"> <group string="Reservation Settings" name="reservation_settings">
<field name="is_reservation_enabled"/> <field name="is_reservation_enabled"/>
<field name="reservation_slot_duration"/> <field name="reservation_slot_duration"/>
@ -25,8 +34,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree editable="bottom"> <tree editable="bottom">
<field name="floor_id"/> <field name="floor_id"/>
<field name="name"/> <field name="name" string="Table Name"/>
<field name="seats"/> <field name="seats" string="Seat Count"/>
<field name="is_reservation_enabled"/> <field name="is_reservation_enabled"/>
<field name="reservation_slot_duration"/> <field name="reservation_slot_duration"/>
<field name="min_party_size"/> <field name="min_party_size"/>

View File

@ -7,8 +7,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Restaurant Tables"> <tree string="Restaurant Tables">
<field name="floor_id"/> <field name="floor_id"/>
<field name="name"/> <field name="name" string="Table Name"/>
<field name="seats"/> <field name="seats" string="Seat Count"/>
<field name="shape"/> <field name="shape"/>
</tree> </tree>
</field> </field>
@ -22,7 +22,7 @@
<form string="Restaurant Table"> <form string="Restaurant Table">
<sheet> <sheet>
<div class="oe_title"> <div class="oe_title">
<label for="name" class="oe_edit_only"/> <label for="name" string="Table Name" class="oe_edit_only"/>
<h1> <h1>
<field name="name" placeholder="e.g. Table 1, T2..."/> <field name="name" placeholder="e.g. Table 1, T2..."/>
</h1> </h1>
@ -30,7 +30,7 @@
<group> <group>
<group string="Basic Configuration" name="basic_config"> <group string="Basic Configuration" name="basic_config">
<field name="floor_id" options="{'no_create': True}"/> <field name="floor_id" options="{'no_create': True}"/>
<field name="seats"/> <field name="seats" string="Seat Count"/>
<field name="shape"/> <field name="shape"/>
</group> </group>
<group string="POS Position &amp; Size" name="pos_layout"> <group string="POS Position &amp; Size" name="pos_layout">