2016-06-27 17:56:47 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!--
|
|
|
|
Copyright 2016 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/>.
|
|
|
|
-->
|
|
|
|
<openerp>
|
|
|
|
<data>
|
|
|
|
|
|
|
|
<!-- Form -->
|
|
|
|
<record model="ir.ui.view" id="session_smart">
|
|
|
|
<field name="name">Add sessions management into smart button</field>
|
|
|
|
<field name="model">golem.activity</field>
|
|
|
|
<field name="inherit_id" ref="golem_activity.view_form" />
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<div name="buttons" position="inside">
|
|
|
|
<button class="oe_inline oe_stat_button" type="object"
|
|
|
|
name="button_session" icon="fa-list">
|
2016-07-10 07:45:55 +02:00
|
|
|
<field string="Sessions" name="session_count"
|
|
|
|
widget="statinfo" />
|
2016-06-27 17:56:47 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="view_form" model="ir.ui.view">
|
|
|
|
<field name="name">GOLEM Activity Sessions Form</field>
|
|
|
|
<field name="model">golem.activity.session</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form>
|
|
|
|
<sheet>
|
2016-07-11 12:19:56 +02:00
|
|
|
<div class="oe_title" style="width: 390px;">
|
|
|
|
<label class="oe_edit_only" for="name" string="Session Name"/>
|
|
|
|
<h1><field name="name" class="oe_inline"/></h1>
|
|
|
|
</div>
|
|
|
|
<group string="Session">
|
2016-06-27 17:56:47 +02:00
|
|
|
<group>
|
|
|
|
<field name="activity_id" />
|
|
|
|
<field name="animator_id" />
|
2016-07-15 23:07:24 +02:00
|
|
|
<field name="type_of" />
|
2016-06-27 21:11:03 +02:00
|
|
|
<field name="places" />
|
2016-06-28 19:20:00 +02:00
|
|
|
<field name="places_min" />
|
2016-06-27 21:11:03 +02:00
|
|
|
<field name="is_overbooked" />
|
|
|
|
<field name="places_overbooked"
|
|
|
|
attrs="{'invisible': [('is_overbooked', '=', False)]}" />
|
2016-06-27 17:56:47 +02:00
|
|
|
</group>
|
|
|
|
<group>
|
2016-07-10 07:45:55 +02:00
|
|
|
<field name="is_recurrent" />
|
|
|
|
<field name="weekday"
|
|
|
|
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
|
|
|
|
<field name="hour_start" widget="float_time"
|
|
|
|
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
|
|
|
|
<field name="hour_end" widget="float_time"
|
|
|
|
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
|
|
|
|
<field name="date_start"
|
|
|
|
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
|
|
|
|
<field name="date_end"
|
|
|
|
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
|
2016-06-27 17:56:47 +02:00
|
|
|
</group>
|
|
|
|
</group>
|
2016-06-27 21:11:03 +02:00
|
|
|
<notebook>
|
|
|
|
<page string="Members">
|
|
|
|
<group>
|
|
|
|
<field name="places_remain" readonly="True" />
|
2016-07-11 17:01:06 +02:00
|
|
|
<field name="member_ids"
|
|
|
|
context="{'search_default_season_default': True}" />
|
2016-06-27 21:11:03 +02:00
|
|
|
</group>
|
|
|
|
</page>
|
2016-07-11 12:19:56 +02:00
|
|
|
<page string="Service">
|
|
|
|
<group>
|
|
|
|
<group>
|
|
|
|
<field name="default_code" />
|
|
|
|
<field name="list_price" />
|
|
|
|
<field name="description"
|
|
|
|
placeholder="describe the activity characteristics..."/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="type" />
|
|
|
|
<field name="categ_id" />
|
|
|
|
<field name="active" />
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</page>
|
2016-06-27 21:11:03 +02:00
|
|
|
</notebook>
|
2016-06-27 17:56:47 +02:00
|
|
|
</sheet>
|
2016-07-11 12:19:56 +02:00
|
|
|
<div class="oe_chatter">
|
|
|
|
<field name="message_follower_ids" widget="mail_followers" />
|
|
|
|
<field name="message_ids" widget="mail_thread" />
|
|
|
|
</div>
|
2016-06-27 17:56:47 +02:00
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Tree -->
|
2016-06-27 21:11:03 +02:00
|
|
|
<record id="session_tree" model="ir.ui.view">
|
2016-06-27 17:56:47 +02:00
|
|
|
<field name="name">Session list</field>
|
|
|
|
<field name="model">golem.activity.session</field>
|
|
|
|
<field name="arch" type="xml">
|
2016-06-28 19:20:00 +02:00
|
|
|
<tree colors="darkgrey: places_used < places_min;
|
|
|
|
red: places_remain == 0;
|
|
|
|
orange: places_remain <= 4;">
|
2016-07-10 07:45:55 +02:00
|
|
|
<field name="is_recurrent" invisible="True" />
|
2016-07-11 07:31:17 +02:00
|
|
|
<field name="season_id" />
|
2016-07-15 23:07:24 +02:00
|
|
|
<field name="type_of" />
|
2016-07-11 12:19:56 +02:00
|
|
|
<field name="session_name" />
|
2016-07-10 07:45:55 +02:00
|
|
|
<field name="weekday" string="Day"
|
|
|
|
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
|
|
|
|
<field name="date_start" string="Date"
|
|
|
|
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
|
2016-07-11 12:19:56 +02:00
|
|
|
<field name="places" invisible="True" />
|
2016-06-28 19:20:00 +02:00
|
|
|
<field name="places_remain" string="Remain" />
|
|
|
|
<field name="places_used" invisible="True" />
|
2016-07-15 23:07:24 +02:00
|
|
|
<field name="places_min" invisible="True" />
|
2016-07-11 17:01:06 +02:00
|
|
|
<field name="list_price" sum="True" />
|
2016-06-27 17:56:47 +02:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2016-07-10 08:15:02 +02:00
|
|
|
<!-- Calendars -->
|
|
|
|
<record id="calendar" model="ir.ui.view">
|
|
|
|
<field name="name">Activity sessions calendar view</field>
|
|
|
|
<field name="model">golem.activity.session</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<calendar date_start="date_start" date_end="date_end"
|
|
|
|
color="categ_id" display="[name]">
|
|
|
|
<field name="name" />
|
|
|
|
</calendar>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2016-06-27 17:56:47 +02:00
|
|
|
<!-- Searches -->
|
|
|
|
<record id="searches" model="ir.ui.view">
|
|
|
|
<field name="name">GOLEM Activity Sessions Searches</field>
|
|
|
|
<field name="model">golem.activity.session</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search>
|
2016-07-11 12:19:56 +02:00
|
|
|
<field name="session_name" />
|
2016-06-27 17:56:47 +02:00
|
|
|
<field name="activity_id" widget="many2one" />
|
|
|
|
<field name="animator_id" widget="many2one" />
|
2016-07-11 12:19:56 +02:00
|
|
|
<field name="categ_id" widget="many2one" />
|
|
|
|
<field name="season_id" widget="many2one" />
|
2016-07-11 07:31:17 +02:00
|
|
|
<filter name="season_default" string="Default season"
|
|
|
|
domain="[('is_current', '=', True)]" />
|
2016-08-03 16:54:25 +02:00
|
|
|
<filter name="full_session" string="Full"
|
|
|
|
domain="[('places_remain', '=', 0)]" />
|
2016-07-15 23:07:24 +02:00
|
|
|
<filter name="type_of_activity" string="Activity"
|
|
|
|
domain="[('type_of', '=', 'activity')]" />
|
|
|
|
<filter name="type_of_workshop" string="Workshop"
|
|
|
|
domain="[('type_of', '=', 'workshop')]" />
|
|
|
|
<filter name="type_of_training" string="Training"
|
|
|
|
domain="[('type_of', '=', 'training')]" />
|
2016-06-27 17:56:47 +02:00
|
|
|
<group string="Group By">
|
2016-07-15 23:07:24 +02:00
|
|
|
<filter name="group_type_of" string="By type"
|
|
|
|
context="{'group_by': 'type_of'}" />
|
2016-07-11 12:19:56 +02:00
|
|
|
<filter name="group_category" string="By category"
|
|
|
|
context="{'group_by': 'categ_id'}"/>
|
2016-06-27 17:56:47 +02:00
|
|
|
<filter name="group_weekday" string="By weekday"
|
|
|
|
context="{'group_by': 'weekday'}" />
|
|
|
|
<filter name="group_animator" string="By animator"
|
|
|
|
context="{'group_by': 'animator_id'}" />
|
|
|
|
</group>
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Actions -->
|
2016-07-11 12:19:56 +02:00
|
|
|
<record id="session_action_list" model="ir.actions.act_window">
|
|
|
|
<field name="name">GOLEM Activities Sessions List</field>
|
|
|
|
<field name="res_model">golem.activity.session</field>
|
2016-07-11 20:12:41 +02:00
|
|
|
<field name="view_mode">tree,form,calendar</field>
|
|
|
|
<!--<field name="view_id" ref="product.product_template_kanban_view"/>-->
|
2016-07-11 12:19:56 +02:00
|
|
|
</record>
|
|
|
|
<record id="category_action" model="ir.actions.act_window">
|
|
|
|
<field name="name">Activities Categories</field>
|
|
|
|
<field name="res_model">product.category</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_id" ref="product.product_category_list_view" />
|
|
|
|
</record>
|
2016-06-27 17:56:47 +02:00
|
|
|
<!-- Menus -->
|
|
|
|
<menuitem id="session_menu_list" name="Activities sessions"
|
|
|
|
parent="golem_activity.activity_menu" action="session_action_list"
|
2016-07-21 12:28:11 +02:00
|
|
|
groups="golem_base.group_golem_user"
|
2016-06-27 17:56:47 +02:00
|
|
|
sequence="10" />
|
2016-07-11 12:19:56 +02:00
|
|
|
<menuitem id="activity_categ" name="Categories"
|
|
|
|
parent="golem_activity.activity_menu" sequence="10"
|
2016-07-21 12:28:11 +02:00
|
|
|
groups="golem_base.group_golem_manager"
|
2016-07-11 12:19:56 +02:00
|
|
|
action="category_action" />
|
2016-06-27 17:56:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
</data>
|
|
|
|
</openerp>
|