Odoo modules related to point of sales
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
4.0 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="restaurant_table_booking_form" model="ir.ui.view">
<field name="name">Booking restaurant.table_booking form</field>
<field name="model">restaurant.table_booking</field>
<field name="arch" type="xml">
<form create="0" edit="0" delete="0">
<sheet>
<group>
<group>
<field name="booking_id" readonly="1"/>
<field name="table_id" options="{'no_open':1, 'no_create':1}"/>
</group>
<group>
<field name="datetime_start"/>
<field name="datetime_stop"/>
<field name="duration"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="restaurant_table_booking_tree" model="ir.ui.view">
<field name="name">Booking restaurant.table_booking tree</field>
<field name="model">restaurant.table_booking</field>
<field name="arch" type="xml">
<tree create="0" edit="0" delete="0">
<field name="booking_id" options="{'no_create':1}"/>
<field name="table_id" options="{'no_open':1, 'no_create':1}"/>
<field name="datetime_start"/>
<field name="datetime_stop"/>
<field name="duration"/>
</tree>
</field>
</record>
<record id="restaurant_table_booking_gantt" model="ir.ui.view">
<field name="name">Booking restaurant.table_booking gantt</field>
<field name="model">restaurant.table_booking</field>
<field name="arch" type="xml">
<gantt string="Tables bookings" date_start="datetime_start" date_stop="datetime_stop" scales="day,week"
default_scale="day" precision="{'day': 'hour:half', 'week': 'day:half'}" default_group_by="table_id" color="color"
create="true" on_create="pos_restaurant_table_booking.create_new_booking_act_window" cell_create="true" edit="false">
<field name="name"/>
<field name="booking_id"/>
<field name="duration"/>
<field name="count"/>
<templates>
<div t-name="gantt-popover" class="container-fluid">
<div class="row no-gutters">
<div class="col">
<ul class="pl-1 mb-0">
<li><strong>Start : </strong> <span t-esc="userTimezoneStartDate.format('YYYY-MM-DD hh:mm A')"/></li>
<li><strong>Stop : </strong> <span t-esc="userTimezoneStopDate.format('YYYY-MM-DD hh:mm A')"/></li>
<li><strong>Duration : </strong> <span t-field="record.duration" t-options="{'widget':'float_time'}"/> hours</li>
<li><strong>People count : </strong> <span t-field="record.count"/> pers.</li>
</ul>
</div>
</div>
</div>
</templates>
</gantt>
</field>
</record>
<record id="restaurant_table_booking_search" model="ir.ui.view">
<field name="name">Booking restaurant.table_booking search</field>
<field name="model">restaurant.table_booking</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="table_id"/>
<field name="datetime_start"/>
</search>
</field>
</record>
<record id="restaurant_table_booking_act_window" model="ir.actions.act_window">
<field name="name">Tables bookings</field>
<field name="res_model">restaurant.table_booking</field>
<field name="view_mode">gantt,form</field>
<!-- <field name="context">{'search_default_today':1}</field> -->
<!-- <field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Prendre une nouvelle réservation.
</p><p>
Une réservation compreend un nom, une date, des horaires et une ou plusieurs tables.
</p>
</field> -->
</record>
<menuitem
id="restaurant_table_booking_menu"
name="Tables bookings"
parent="restaurant_booking_root_menu"
action="restaurant_table_booking_act_window"
sequence="20"
groups="point_of_sale.group_pos_user"/>
</odoo>