2018-02-07 01:44:48 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!--
|
2018-02-18 07:27:32 +01:00
|
|
|
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
2018-02-08 00:58:23 +01:00
|
|
|
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
2018-02-07 01:44:48 +01:00
|
|
|
|
|
|
|
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>
|
2018-02-12 16:05:52 +01:00
|
|
|
|
2018-02-18 12:25:11 +01:00
|
|
|
<!-- Trees -->
|
|
|
|
<record model="ir.ui.view" id="golem_resource_view_tree">
|
|
|
|
<field name="name">GOLEM Resource Tree</field>
|
|
|
|
<field name="model">golem.resource</field>
|
2018-02-07 01:44:48 +01:00
|
|
|
<field name="arch" type="xml">
|
2018-02-18 12:25:11 +01:00
|
|
|
<tree>
|
|
|
|
<field name="name" />
|
|
|
|
<field name="type_id" />
|
|
|
|
<field name="supervisor_id" />
|
|
|
|
<field name="product_tmpl_id" />
|
2018-08-02 19:43:58 +02:00
|
|
|
<field name="availability_start" />
|
|
|
|
<field name="availability_stop" />
|
2018-02-18 12:25:11 +01:00
|
|
|
<field name="validation_required" />
|
2018-02-07 01:44:48 +01:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
2018-02-08 00:58:23 +01:00
|
|
|
|
2018-02-18 12:25:11 +01:00
|
|
|
<!-- Forms -->
|
|
|
|
<record model="ir.ui.view" id="golem_resource_view_form">
|
|
|
|
<field name="name">GOLEM Resource Form</field>
|
|
|
|
<field name="model">golem.resource</field>
|
2018-02-07 01:44:48 +01:00
|
|
|
<field name="arch" type="xml">
|
2018-02-18 12:25:11 +01:00
|
|
|
<form>
|
2018-02-07 01:44:48 +01:00
|
|
|
<sheet>
|
2018-02-18 12:25:11 +01:00
|
|
|
<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'}" />
|
2018-02-08 12:02:46 +01:00
|
|
|
</button>
|
2018-03-10 07:44:24 +01:00
|
|
|
<button class="oe_stat_button" icon="fa-list"
|
|
|
|
name="reserveration_list" type="object">
|
|
|
|
<field string="Reservations" name="reservation_count"
|
|
|
|
widget="statinfo"/>
|
|
|
|
</button>
|
|
|
|
<button class="oe_stat_button" icon="fa-calendar"
|
|
|
|
name="reservation_calendar" type="object" string="Calendar" />
|
2018-02-08 12:02:46 +01:00
|
|
|
</div>
|
2018-02-18 14:53:53 +01:00
|
|
|
<group>
|
|
|
|
<group>
|
|
|
|
<field name="name" />
|
|
|
|
<field name="type_id" />
|
2018-02-18 16:42:29 +01:00
|
|
|
<field name="product_tmpl_id" options="{'no_create': True}" />
|
2018-02-07 01:44:48 +01:00
|
|
|
</group>
|
2018-02-18 14:53:53 +01:00
|
|
|
<group>
|
2018-03-27 15:46:18 +02:00
|
|
|
<field name="validation_required" />
|
|
|
|
<field name="supervisor_id" />
|
2018-02-08 23:21:33 +01:00
|
|
|
</group>
|
2018-02-18 14:53:53 +01:00
|
|
|
</group>
|
2018-08-02 19:43:58 +02:00
|
|
|
<group string="availability configuration">
|
2018-02-18 14:53:53 +01:00
|
|
|
<group colspan="2">
|
|
|
|
<field name="id" invisible="1"/>
|
2018-08-02 19:43:58 +02:00
|
|
|
<field name="availability_24_7"/>
|
|
|
|
<field name="availability_start" />
|
|
|
|
<field name="availability_stop" />
|
2018-02-18 14:53:53 +01:00
|
|
|
</group>
|
2018-03-09 13:54:52 +01:00
|
|
|
<p attrs="{'invisible': ['|',
|
|
|
|
('id', '!=', False),
|
2018-08-02 19:43:58 +02:00
|
|
|
('availability_24_7', '=', True)]}">
|
|
|
|
Please save the resource before fixing the timetable availability"
|
2018-02-18 14:53:53 +01:00
|
|
|
</p>
|
2018-08-02 19:43:58 +02:00
|
|
|
<group colspan="2" attrs="{'invisible': [('availability_24_7', '=', True)]}">
|
2018-02-18 12:25:11 +01:00
|
|
|
<field name="timetable_ids"
|
|
|
|
context="{'default_resource_id': active_id}"
|
2018-02-18 17:18:09 +01:00
|
|
|
attrs="{'readonly': [('id', '=', False)]}" />
|
2018-02-18 14:53:53 +01:00
|
|
|
</group>
|
2018-02-07 01:44:48 +01:00
|
|
|
</group>
|
|
|
|
</sheet>
|
2018-02-18 17:30:11 +01:00
|
|
|
<div class="oe_chatter">
|
|
|
|
<field name="message_follower_ids" widget="mail_followers" />
|
|
|
|
<field name="message_ids" widget="mail_thread" />
|
|
|
|
</div>
|
2018-02-07 01:44:48 +01:00
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2018-02-18 13:51:46 +01:00
|
|
|
<!-- Searches -->
|
|
|
|
<record model="ir.ui.view" id="golem_resource_view_search">
|
|
|
|
<field name="name">GOLEM Resource search</field>
|
|
|
|
<field name="model">golem.resource</field>
|
2018-02-08 23:21:33 +01:00
|
|
|
<field name="arch" type="xml">
|
2018-02-18 13:51:46 +01:00
|
|
|
<search>
|
2018-02-18 12:25:11 +01:00
|
|
|
<field name="name" />
|
2018-02-18 13:51:46 +01:00
|
|
|
<field name="type_id" />
|
|
|
|
<field name="supervisor_id" />
|
|
|
|
<field name="product_tmpl_id" />
|
2018-02-18 14:53:53 +01:00
|
|
|
<filter name="with_validation" string="With validation"
|
|
|
|
domain="[('validation_required', '=', True)]" />
|
|
|
|
<filter name="without_validation" string="Without validation"
|
|
|
|
domain="[('validation_required', '=', False)]" />
|
|
|
|
<separator />
|
|
|
|
<filter name="archived" string="Archived"
|
|
|
|
domain="[('active', '=', False)]" />
|
|
|
|
<filter name="group_type" string="Type"
|
|
|
|
context="{'group_by': 'type_id'}"/>
|
|
|
|
<filter name="group_supervisor" string="Supervisor"
|
|
|
|
context="{'group_by': 'supervisor_id'}"/>
|
|
|
|
<filter name="group_product" string="Linked product"
|
|
|
|
context="{'group_by': 'product_tmpl_id'}"/>
|
2018-02-18 13:51:46 +01:00
|
|
|
</search>
|
2018-02-08 23:21:33 +01:00
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2018-02-18 12:25:11 +01:00
|
|
|
<!-- Actions -->
|
2018-02-18 13:51:46 +01:00
|
|
|
<act_window id="golem_resource_action" name="Resources"
|
|
|
|
res_model="golem.resource" view_mode="tree,form" />
|
2018-02-18 12:25:11 +01:00
|
|
|
|
|
|
|
<!-- Menus -->
|
|
|
|
<menuitem id="golem_resource_menu" name="Resources"
|
2020-05-21 02:56:12 +02:00
|
|
|
sequence="55" groups="golem_base.group_golem_user,golem_base.group_golem_auditor"
|
2018-02-18 13:55:53 +01:00
|
|
|
web_icon="golem_resource,static/description/icon.png" />
|
|
|
|
<menuitem id="resource_list_menu" name="Resources" parent="golem_resource_menu"
|
2018-02-18 12:25:11 +01:00
|
|
|
action="golem_resource_action" sequence="10" />
|
2018-02-18 07:59:24 +01:00
|
|
|
<menuitem id="resource_configuration_menu" name="Configuration"
|
2020-05-21 02:56:12 +02:00
|
|
|
parent="golem_resource_menu" groups="golem_base.group_golem_manager,golem_base.group_golem_auditor"
|
2018-02-18 12:25:11 +01:00
|
|
|
sequence="90" />
|
|
|
|
|
2018-02-07 01:44:48 +01:00
|
|
|
</data>
|
|
|
|
</odoo>
|