GOLEM/golem_activity_queue/views/golem_activity_queue_views.xml

98 lines
3.5 KiB
XML
Raw Normal View History

<?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>
<!-- Form -->
<record model="ir.ui.view" id="golem_activity_queue_view_form">
<field name="name">GOLEM Activity Queue Form</field>
<field name="model">golem.activity.queue</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="activity_id"/>
<field name="season_id"/>
<field name="member_id"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Search -->
<record model="ir.ui.view" id="golem_activity_queue_view_search">
<field name="name">GOLEM Activity Queue Search</field>
<field name="model">golem.activity.queue</field>
<field name="arch" type="xml">
<search>
<field name="member_id"/>
<field name="activity_id"/>
<field name="season_id" />
<filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" />
<separator />
<filter name="activity_full" string="Full Activity"
domain="[('places_remain', '=', 0)]" />
<filter name="activity_nfull" string="Not Full Activity"
domain="[('places_remain', '&gt;', 0)]" />
<group string="Group By">
<filter name="group_by_member" string="Member"
context="{'group_by': 'member_id'}"/>
<filter name="group_by_activity" string="Activity"
context="{'group_by': 'activity_id'}"/>
</group>
</search>
</field>
</record>
<!-- Tree -->
<record model="ir.ui.view" id="golem_activity_queue_view_tree">
<field name="name">GOLEM Activity Queue Tree</field>
<field name="model">golem.activity.queue</field>
<field name="arch" type="xml">
<tree editable="top"
colors="grey: places_remain == 0; blue : places_remain &gt;= 1">
<field name="sequence" widget="handle"/>
<field name="member_id"/>
<field name="activity_id"
domain="[('places_remain','&lt;' , 1), ('queue_allowed', '=', True), ('is_current', '=', True)]"
options="{'no_create': True}"/>
<field name="season_id" readonly='1'/>
<field name="create_date" readonly="1"/>
<field name='places_remain' />
</tree>
</field>
</record>
<!-- Action -->
<act_window id="golem_activity_queue_action" name="Activity queue"
res_model="golem.activity.queue" view_mode="tree"
context="{'search_default_season_default': True}" />
<!-- Menu -->
<menuitem id="golem_activity_queue_menu" name="Activity queue"
parent="golem_activity.golem_activity_menu"
action="golem_activity_queue_action"
sequence="20" />
</data>
</odoo>