GOLEM/golem_resource_holiday/views/golem_resource_holiday_view...

90 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2020 Youssef El Ouahby <youssef@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>
<!-- Trees -->
<record model="ir.ui.view" id="golem_resource_holiday_view_tree">
<field name="name">GOLEM Resource Holiday Tree</field>
<field name="model">golem.resource.holiday</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="period_id"/>
<field name="date_start"/>
<field name="date_end"/>
</tree>
</field>
</record>
<!-- Forms -->
<record model="ir.ui.view" id="golem_resource_holiday_view_form">
<field name="name">GOLEM Resource Holiday Form</field>
<field name="model">golem.resource.holiday</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<group>
<field name="period_id" options="{'no_create': True}"/>
</group>
<group>
<field name="date_start"/>
<field name="date_end"/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
</form>
</field>
</record>
<!-- Searches -->
<record model="ir.ui.view" id="golem_resource_holiday_view_search">
<field name="name">GOLEM Resource Holiday search</field>
<field name="model">golem.resource.holiday</field>
<field name="arch" type="xml">
<search>
<field name="name" />
<field name="period_id" />
<filter name="group_period" string="Period"
context="{'group_by': 'period_id'}"/>
</search>
</field>
</record>
<!-- Actions -->
<act_window id="golem_resource_holiday_action" name="Resource Holiday"
res_model="golem.resource.holiday" view_mode="tree,form" />
<!-- Menus -->
<menuitem id="resource_holiday_root_menu" name="Resources Holiday"
parent="golem_resource.resource_configuration_menu"
sequence="50"/>
<menuitem id="resource_holiday_menu" name="Holiday"
parent="resource_holiday_root_menu"
action="golem_resource_holiday_action"
sequence="10"/>
</data>
</odoo>