GOLEM/golem_resource_holiday/views/golem_resource_views.xml

48 lines
2.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>
<!-- Forms -->
<record model="ir.ui.view"
id="golem_resource_view_form_inherit_golem_resource_holiday">
<field name="name"> GOLEM Resource Form inherit GOLEM Resource Holiday</field>
<field name="model">golem.resource</field>
<field name='inherit_id' ref="golem_resource.golem_resource_view_form"/>
<field name="arch" type="xml">
<page name="availability" position="after">
<page name="holiday_period_selection" string="Holiday Period Selection">
<group>
<field name="holiday_period_ids" widget="many2many_tags" options="{'no_create': True}"/>
<field name="holiday_selection_ids"
context="{'default_resource_id': active_id}"
attrs="{'invisible': [('holiday_period_ids', '=', [])]}">
<tree create="false" edit="true" delete="false" editable="top">
<field name="resource_id" invisible="1"/>
<field name="holiday_id" readonly="1"/>
<field name="is_reservation_possible"/>
</tree>
</field>
</group>
</page>
</page>
</field>
</record>
</data>
</odoo>