GOLEM/golem_ressources/views/golem_reservation_views.xml

114 lines
4.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Calendars -->
<record model="ir.ui.view" id="golem_resource_reservation_view_calendar">
<field name="name">GOLEM Resource Reservation Calendar</field>
<field name="model">golem.resource.reservation</field>
<field name="arch" type="xml">
<calendar date_start="date_start" date_stop="date_stop" color="resource_id">
<field name="resource_id" />
<field name="user_id" />
<field name="partner_id" />
</calendar>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="golem_resource_reservation_view_tree">
<field name="name">GOLEM Resource Reservation Tree</field>
<field name="model">golem.resource.reservation</field>
<field name="arch" type="xml">
<tree>
<field name="date_start" />
<field name="date_stop" />
<field name="resource_id" />
<field name="user_id" />
<field name="partner_id" />
<field name="status" />
</tree>
</field>
</record>
<!-- Forms -->
<record model="ir.ui.view" id="golem_resource_reservation_view_form">
<field name="name">GOLEM Resource Reservation Form</field>
<field name="model">golem.resource.reservation</field>
<field name="arch" type="xml">
<form>
<header>
<button name="status_confirm" type="object"
string="Confirm" status="draft"
class="oe_highlight" />
<button name="status_canceled" type="object"
string="Cancel" status="confirmed" />
<button name="status_validated" type="object"
string="Validate" status="confirmed"
class="oe_highlight" />
<button name="status_rejected" type="object"
string="Reject" status="confirmed"
class="oe_highlight" />
<field name="status" widget="statusbar" />
</header>
<sheet>
<group>
<field name="date_start" />
<field name="date_stop" />
<field name="resource_id" />
<field name="user_id" />
<field name="partner_id" />
<field name="rejection_reason" />
</group>
</sheet>
</form>
</field>
</record>
<!-- Searches -->
<record model="ir.ui.view" id="golem_resource_reservation_view_search">
<field name="name">GOLEM Resource Reservation Search</field>
<field name="model">golem.resource.reservation</field>
<field name="arch" type="xml">
<search>
<field name="date_start" />
<field name="date_stop" />
<field name="resource_id" />
<field name="user_id" />
<field name="partner_id" />
<field name="status" />
<filter name="to_validate" string="Reservation to Validate"
domain="[('status', '=', 'confirmed')]" />
</search>
</field>
</record>
<!-- Actions -->
<act_window id="golem_resource_reservation_action" name="Reservations"
res_model="golem.resource.reservation" view_mode="tree,form,calendar" />
<!-- Menus -->
<menuitem id="golem_resource_reservation_menu" name="Reservations"
parent="golem_resource_menu" action="golem_resource_reservation_action"
sequence="20" />
</data>
</odoo>