97 lines
4.0 KiB
XML
97 lines
4.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>
|
|
<!--formulaire du modèle golem.activity.queue-->
|
|
<record model="ir.ui.view" id="queue_form_view">
|
|
<field name="name">queue.form</field>
|
|
<field name="model">golem.activity.queue</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Queue Form">
|
|
<sheet>
|
|
<group>
|
|
<field name="activity_id"/>
|
|
<field name="season_id"/>
|
|
<field name="member_id"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<!--Recherche du modèle golem.activity.queue-->
|
|
<record model="ir.ui.view" id="queue_search_view">
|
|
<field name="name">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)]" />
|
|
<filter name="full_activity" string="Full Activity"
|
|
domain="[('is_activity_full', '=', 'Full activity')]" />
|
|
<filter name="not_full_activity" string="Not Full Activity"
|
|
domain="[('is_activity_full', '=', 'Not full activity')]" />
|
|
<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'}"/>
|
|
<filter name="group_by_is_full_activity" string="Activity full"
|
|
context="{'group_by': 'is_activity_full'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<!--liste editable du modèle golem.activity.queue-->
|
|
<record model="ir.ui.view" id="queue_tree_view">
|
|
<field name="name">queue.tree</field>
|
|
<field name="model">golem.activity.queue</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Queue Tree"
|
|
editable="top"
|
|
colors="grey: places_remain == 0; blue : places_remain >= 1">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="member_id"/>
|
|
<field name="activity_id"
|
|
domain="[('places_remain','<' , 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' />
|
|
<field name="is_activity_full" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<!-- Action -->
|
|
<record id="golem_activity_queue_action" model="ir.actions.act_window">
|
|
<field name="name">GOLEM Activity Queue List</field>
|
|
<field name="res_model">golem.activity.queue</field>
|
|
<field name="view_mode">tree,search</field>
|
|
<field name="context">{'search_default_season_default': True}</field>
|
|
</record>
|
|
<!-- 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>
|