GOLEM/golem_ressources/views/golem_resources_views.xml

134 lines
5.0 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>
<!-- Searches -->
<record model="ir.ui.view" id="golem_resource_view_search">
<field name="name">GOLEM Resource search</field>
<field name="model">golem.resource</field>
<field name="arch" type="xml">
<search>
<field name="name" />
<field name="type_id" />
<field name="supervisor_id" />
<field name="product_tmpl_id" />
</search>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="golem_resource_view_tree">
<field name="name">GOLEM Resource Tree</field>
<field name="model">golem.resource</field>
<field name="arch" type="xml">
<tree>
<field name="name" />
<field name="type_id" />
<field name="supervisor_id" />
<field name="product_tmpl_id" />
<field name="avaibility_start" />
<field name="avaibility_stop" />
<field name="validation_required" />
</tree>
</field>
</record>
<!-- Forms -->
<record model="ir.ui.view" id="golem_resource_view_form">
<field name="name">GOLEM Resource Form</field>
<field name="model">golem.resource</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" icon="fa-archive"
name="active_toggle" type="object">
<field name="active" widget="boolean_button"
options="{'terminology': 'archive'}" />
</button>
</div>
<group colspan="2">
<group colspan="4" col="4">
<field name="name"/>
<field name="validation_required"/>
<field name="type_id"/>
<field name="supervisor_id"/>
<field name="product_tmpl_id"/>
</group>
<field name="id" invisible="1"/>
<group colspan="3">
<separator string="Availibility configuration" colspan="3"/>
<field name="avaibility_start"/>
<field name="avaibility_stop"/>
</group>
<label string="Please save the resource before fixing the timetable availibility" attrs="{'invisible': [('id', '!=', False)]}"/>
<group colspan="3">
<field name="timetable_ids"
context="{'default_resource_id': active_id}"
attrs="{'readonly': [('id', '=', False)]}">
<tree editable="bottom" >
<field name="resource_id" invisible="1" />
<field name="weekday" />
<field name="time_start" widget="float_time" />
<field name="time_stop" widget="float_time" />
</tree>
</field>
</group>
</group>
</sheet>
</form>
</field>
</record>
<!-- Actions -->
<act_window id="golem_resource_action" name="Resources"
res_model="golem.resource" view_mode="tree,form" />
<!-- Trees -->
<record model="ir.ui.view" id="golem_resource_type_view_tree">
<field name="name">GOLEM Resource Type Tree</field>
<field name="model">golem.resource.type</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="name" />
</tree>
</field>
</record>
<!-- Actions -->
<act_window id="golem_resource_type_action" name="Resource Types"
res_model="golem.resource.type" view_mode="tree" />
<!-- Menus -->
<menuitem id="golem_resource_menu" name="Resources"
sequence="55" groups="golem_base.group_golem_user"
web_icon="golem_ressources,static/description/icon.png" />
<menuitem id="resources_list_menu" name="Resources" parent="golem_resource_menu"
action="golem_resource_action" sequence="10" />
<menuitem id="resource_configuration_menu" name="Configuration"
parent="golem_resource_menu" groups="golem_base.group_golem_manager"
sequence="90" />
<menuitem id="resource_cofiguration_type_menu" name="Resource Types"
parent="resource_configuration_menu"
action="golem_resource_type_action" sequence="10" />
</data>
</odoo>