129 lines
6.8 KiB
XML
129 lines
6.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Floor Kanban View (Custom Dine360 UI) -->
|
|
<record id="view_restaurant_floor_kanban" model="ir.ui.view">
|
|
<field name="name">restaurant.floor.kanban.dine360</field>
|
|
<field name="model">restaurant.floor</field>
|
|
<field name="arch" type="xml">
|
|
<kanban class="o_kanban_mobile" sample="1">
|
|
<field name="id"/>
|
|
<field name="name"/>
|
|
<field name="table_ids"/>
|
|
<field name="pos_config_ids"/>
|
|
<field name="background_color"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div t-attf-class="oe_kanban_global_click p-3 mb-2"
|
|
style="border-radius: 16px; border: 1px solid #e2e8f0; background: #ffffff; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05); min-height: 155px; display: flex; flex-direction: column; justify-content: space-between; transition: all 0.25s ease;">
|
|
|
|
<!-- Header -->
|
|
<div class="d-flex align-items-center justify-content-between mb-2">
|
|
<span class="badge rounded-pill px-2.5 py-1" style="background: #fee2e2; color: #e50000; font-size: 11px; font-weight: 700;">
|
|
<i class="fa fa-building me-1"/> Dining Zone
|
|
</span>
|
|
<span t-if="record.background_color.raw_value" class="badge rounded-pill border px-2 py-1"
|
|
t-attf-style="background-color: #{record.background_color.raw_value}; color: #333; font-size: 11px;">
|
|
Floor Color
|
|
</span>
|
|
</div>
|
|
|
|
<!-- Middle -->
|
|
<div class="d-flex align-items-center gap-3 my-2">
|
|
<div class="d-flex align-items-center justify-content-center"
|
|
style="width: 48px; height: 48px; border-radius: 12px; background: #f1f5f9; color: #0f172a; font-size: 20px; flex-shrink: 0;">
|
|
<i class="fa fa-th-large"/>
|
|
</div>
|
|
<div class="overflow-hidden">
|
|
<div class="fw-bold text-dark text-truncate" style="font-size: 18px;">
|
|
<t t-esc="record.name.value"/>
|
|
</div>
|
|
<div class="text-muted small">
|
|
Floor Plan Section
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="d-flex align-items-center justify-content-between pt-2.5 border-top mt-2">
|
|
<span class="badge rounded-pill px-2.5 py-1"
|
|
style="background: #f8fafc; color: #0f172a; font-size: 12px; font-weight: 600; border: 1px solid #e2e8f0;">
|
|
<i class="fa fa-th text-danger me-1"/>
|
|
<t t-esc="record.table_ids.raw_value and record.table_ids.raw_value.length or 0"/> Tables Placed
|
|
</span>
|
|
<span class="text-muted small font-monospace">
|
|
ID #<t t-esc="record.id.raw_value"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Tree View -->
|
|
<record id="view_restaurant_floor_tree" model="ir.ui.view">
|
|
<field name="name">restaurant.floor.tree.dine360</field>
|
|
<field name="model">restaurant.floor</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Restaurant Floors" sample="1">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name" string="Floor Name" class="fw-bold text-dark"/>
|
|
<field name="table_ids" widget="many2many_tags" string="Tables Placed"/>
|
|
<field name="pos_config_ids" widget="many2many_tags" string="Point of Sale Registers"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Form View -->
|
|
<record id="view_restaurant_floor_form" model="ir.ui.view">
|
|
<field name="name">restaurant.floor.form.dine360</field>
|
|
<field name="model">restaurant.floor</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Restaurant Floor">
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<label for="name" class="oe_edit_only text-muted small fw-bold"/>
|
|
<h1 class="text-danger fw-bold">
|
|
<field name="name" placeholder="e.g. Ground Floor, Garden, VIP..."/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group string="Configurations">
|
|
<field name="pos_config_ids" widget="many2many_tags" placeholder="Link to Point of Sale Configs..."/>
|
|
<field name="background_color" widget="color" placeholder="e.g. rgb(220, 220, 220)"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Tables on Floor" name="tables">
|
|
<field name="table_ids" context="{'default_floor_id': active_id}">
|
|
<tree string="Tables" editable="bottom">
|
|
<field name="name" string="Table Label"/>
|
|
<field name="seats" string="Seats"/>
|
|
<field name="shape" string="Shape"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Floor Window Action -->
|
|
<record id="action_restaurant_floor_form" model="ir.actions.act_window">
|
|
<field name="name">Floors</field>
|
|
<field name="res_model">restaurant.floor</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="view_id" ref="view_restaurant_floor_kanban"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new floor plan!
|
|
</p>
|
|
<p>
|
|
Floors represent different physical sections of your restaurant (e.g., Main Hall, Terrace, Bar).
|
|
</p>
|
|
</field>
|
|
</record>
|
|
</odoo>
|