2017-11-10 15:03:12 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<odoo>
|
|
|
|
<!-- Form -->
|
|
|
|
<record id="view_form_event" model="ir.ui.view">
|
|
|
|
<field name="name">Event Form</field>
|
|
|
|
<field name="model">coworking.event</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="event">
|
2017-11-14 13:43:06 +01:00
|
|
|
<header>
|
|
|
|
<field name="statut" widget="statusbar" clickable="1" />
|
|
|
|
</header>
|
2017-11-10 15:03:12 +01:00
|
|
|
<sheet>
|
|
|
|
<group name="group_top">
|
|
|
|
<group name="group_left">
|
2017-11-15 15:20:49 +01:00
|
|
|
<field name="title" />
|
2017-11-13 19:31:43 +01:00
|
|
|
<field name="manager_id" />
|
2017-11-10 15:03:12 +01:00
|
|
|
<field name="date_start" />
|
2017-11-14 17:19:02 +01:00
|
|
|
<field name="starts_this_week" attrs="{'invisible': [('date_start', '=', True)]}" />
|
2017-11-10 15:03:12 +01:00
|
|
|
<field name="date_end" />
|
2017-11-15 13:23:53 +01:00
|
|
|
<field name="duration" widget="float_time" />
|
2017-11-13 16:45:45 +01:00
|
|
|
<field name="description" />
|
2017-11-14 13:43:06 +01:00
|
|
|
<field name="participants_ids" widget="many2many_tags"
|
|
|
|
options="{'no_create': true}" />
|
2017-11-10 15:03:12 +01:00
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</sheet>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2017-11-13 19:31:43 +01:00
|
|
|
<!-- Tree -->
|
|
|
|
<record id="view_tree_coworker" model="ir.ui.view">
|
2017-11-15 15:20:49 +01:00
|
|
|
<field name="title">event Tree</field>
|
2017-11-13 19:31:43 +01:00
|
|
|
<field name="model">coworking.event</field>
|
|
|
|
<field name="arch" type="xml">
|
2017-11-15 11:59:12 +01:00
|
|
|
<tree default_order="date_start asc">
|
2017-11-15 15:20:49 +01:00
|
|
|
<field name="title" />
|
2017-11-13 19:31:43 +01:00
|
|
|
<field name="manager_id" />
|
|
|
|
<field name="date_start" />
|
2017-11-14 13:43:06 +01:00
|
|
|
<field name="participants_count" />
|
2017-11-13 19:31:43 +01:00
|
|
|
<field name="statut" />
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2017-11-14 13:43:06 +01:00
|
|
|
<!-- Search -->
|
|
|
|
<record id="view_search_event" model="ir.ui.view">
|
2017-11-15 15:20:49 +01:00
|
|
|
<field name="title">Event Search</field>
|
2017-11-14 13:43:06 +01:00
|
|
|
<field name="model">coworking.event</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search>
|
2017-11-15 15:20:49 +01:00
|
|
|
<field name="title" />
|
2017-11-14 17:19:02 +01:00
|
|
|
<field name="manager_id" />
|
2017-11-14 13:43:06 +01:00
|
|
|
|
2017-11-14 17:19:02 +01:00
|
|
|
<filter name="status_confirmed" string="Confirmed"
|
|
|
|
domain="[('statut','=','confirmed')]" />
|
|
|
|
<filter name="status_draft" string="Draft"
|
|
|
|
domain="[('statut','=','draft')]" />
|
|
|
|
<filter name="canceled" string="Canceled"
|
|
|
|
domain="[('statut','=','canceled')]" />
|
2017-11-14 13:43:06 +01:00
|
|
|
|
|
|
|
<separator />
|
2017-11-14 17:19:02 +01:00
|
|
|
<filter name="this_week" string="Starts this week"
|
|
|
|
domain="[('starts_this_week','=', True)]" />
|
2017-11-14 13:43:06 +01:00
|
|
|
|
2017-11-14 17:19:02 +01:00
|
|
|
<filter name="this_30_month" string="Starts 30 month"
|
|
|
|
domain="[('date_start','<=', datetime.datetime.combine(context_today() + datetime.timedelta(days=30), datetime.time(23,59,59))),
|
|
|
|
('date_start','>=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" />
|
2017-11-14 13:43:06 +01:00
|
|
|
|
2017-11-14 17:19:02 +01:00
|
|
|
<filter name="group_status" string="Group status"
|
|
|
|
context="{'group_by': 'statut'}" />
|
|
|
|
<filter name="group_manager_id" string="Group manager"
|
|
|
|
context="{'group_by': 'manager_id'}" />
|
|
|
|
<filter name="group_years_start" string="Group years start"
|
2017-11-14 18:12:07 +01:00
|
|
|
context="{'group_by': 'date_start:year'}" />
|
2017-11-14 13:43:06 +01:00
|
|
|
|
2017-11-14 18:12:07 +01:00
|
|
|
<filter name="group_month" string="Group month"
|
|
|
|
context="{'group_by': 'date_start:month'}" />
|
2017-11-14 13:43:06 +01:00
|
|
|
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
2017-11-15 10:25:41 +01:00
|
|
|
<!-- Calendar -->
|
|
|
|
<record id="view_calendar_event" model="ir.ui.view">
|
2017-11-15 15:20:49 +01:00
|
|
|
<field name="title">Event Calendar</field>
|
2017-11-15 10:25:41 +01:00
|
|
|
<field name="model">coworking.event</field>
|
|
|
|
<field name="arch" type="xml">
|
2017-11-15 10:53:34 +01:00
|
|
|
<calendar date_start="date_start" date_stop="date_end"
|
2017-11-15 15:20:49 +01:00
|
|
|
display="title : [title]" >
|
|
|
|
<field name="title" />
|
2017-11-15 10:25:41 +01:00
|
|
|
</calendar>
|
|
|
|
</field>
|
|
|
|
</record>
|
2017-11-14 13:43:06 +01:00
|
|
|
|
2017-11-10 15:03:12 +01:00
|
|
|
</odoo>
|