382 lines
20 KiB
XML
382 lines
20 KiB
XML
<?xml version="1.0"?>
|
|
<flectra>
|
|
|
|
<!-- Calendar Events Types : Views and Actions -->
|
|
<record id="view_calendar_event_type_tree" model="ir.ui.view">
|
|
<field name="name">calendar.event.type</field>
|
|
<field name="model">calendar.event.type</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Meeting Types" editable="bottom">
|
|
<field name="name"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_calendar_event_type" model="ir.actions.act_window">
|
|
<field name="name">Meeting Types</field>
|
|
<field name="res_model">calendar.event.type</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_id" ref="view_calendar_event_type_tree"/>
|
|
</record>
|
|
|
|
<!-- Calendar Alarm : -->
|
|
<record id="view_calendar_alarm_tree" model="ir.ui.view">
|
|
<field name="name">calendar.alarm.tree</field>
|
|
<field name="model">calendar.alarm</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Calendar Alarm" editable="bottom">
|
|
<field name="name"/>
|
|
<field name="type"/>
|
|
<field name="duration"/>
|
|
<field name="interval"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="calendar_alarm_view_form" model="ir.ui.view">
|
|
<field name="name">calendar.alarm.form</field>
|
|
<field name="model">calendar.alarm</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Calendar Alarm">
|
|
<group>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="type" groups="base.group_no_one"/>
|
|
</group>
|
|
<group>
|
|
<label for="duration"/>
|
|
<div>
|
|
<field name="duration" class="oe_inline"/>
|
|
<field name="interval" class="oe_inline ml8"/>
|
|
</div>
|
|
</group>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_calendar_alarm" model="ir.actions.act_window">
|
|
<field name="name">Calendar Alarm</field>
|
|
<field name="res_model">calendar.alarm</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_id" ref="view_calendar_alarm_tree"/>
|
|
</record>
|
|
|
|
<!-- Calendar Events : Views and Actions -->
|
|
<record id="view_calendar_event_tree" model="ir.ui.view">
|
|
<field name="name">calendar.event.tree</field>
|
|
<field name="model">calendar.event</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Meetings" decoration-bf="message_needaction==True">
|
|
<field name="name" string="Subject"/>
|
|
<field name="allday" invisible="True"/>
|
|
<field name="start" string="Start Date"/>
|
|
<field name="stop" string="End Date"/>
|
|
<field name="partner_ids"/>
|
|
<field name="location"/>
|
|
<field name="state" invisible="True"/>
|
|
<field name="duration" widget="float_time"/>
|
|
<field name="message_needaction" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_calendar_event_form" model="ir.ui.view">
|
|
<field name="name">calendar.event.form</field>
|
|
<field name="model">calendar.event</field>
|
|
<field name="priority" eval="1"/>
|
|
<field name="arch" type="xml">
|
|
<form string="Meetings">
|
|
<sheet>
|
|
<button string="Document" class="oe_stat_button pull-right" icon="fa-bars" type="object" name="action_open_calendar_event" attrs="{'invisible': ['|', ('res_model', '=', False), ('res_id', '=', False)]}"/>
|
|
<field name="res_model" invisible="1" />
|
|
<field name="res_id" invisible="1" />
|
|
<field name="state" invisible="1"/>
|
|
<field name="is_attendee" invisible="1"/>
|
|
<field name="attendee_status" invisible="1"/>
|
|
<div class="oe_title">
|
|
<div class="oe_edit_only">
|
|
<label for="name"/>
|
|
</div>
|
|
<h1>
|
|
<field name="name" placeholder="e.g. Business Lunch"/>
|
|
</h1>
|
|
<label for="partner_ids" string="Attendees" class="oe_edit_only"/>
|
|
<h2>
|
|
<field name="partner_ids" widget="many2manyattendee"
|
|
placeholder="Select attendees..."
|
|
context="{'force_email':True}"
|
|
class="oe_inline"/>
|
|
</h2>
|
|
</div>
|
|
<notebook>
|
|
<page name="page_details" string="Meeting Details">
|
|
<group attrs="{'invisible': [('recurrency','==',False)]}" class="oe_edit_only ">
|
|
<p class='alert alert-warning'> This event is linked to a recurrence...<br/>
|
|
<button type="object" name="action_detach_recurring_event" string="Update only this instance" help="Click here to update only this instance and not all recurrences. " class="oe_link"/>
|
|
</p>
|
|
</group>
|
|
<group>
|
|
<group>
|
|
<field name="start" attrs="{'invisible': True}"/>
|
|
<field name="stop" attrs="{'invisible': True}"/>
|
|
<field name="id" attrs="{'invisible': True}"/>
|
|
|
|
<field name="start_date" string="Starting at" attrs="{'required': [('allday','=',True)], 'invisible': [('allday','=',False)], 'readonly': [('id', '!=', False), ('recurrency','=',True)]}"/>
|
|
<field name="stop_date" string="Ending at" attrs="{'required': [('allday','=',True)],'invisible': [('allday','=',False)], 'readonly': [('id', '!=', False), ('recurrency','=',True)]}"/>
|
|
|
|
<field name="start_datetime" string="Starting at" attrs="{'required': [('allday','=',False)], 'invisible': [('allday','=',True)], 'readonly': [('id', '!=', False), ('recurrency','=',True)]}"/>
|
|
<field name="stop_datetime" invisible="1"/>
|
|
<label for="duration" attrs="{'invisible': [('allday','=',True)]}"/>
|
|
<div attrs="{'invisible': [('allday','=',True)]}">
|
|
<field name="duration" widget="float_time" string="Duration" class="oe_inline" attrs="{'readonly': [('id', '!=', False), ('recurrency','=',True)]}"/>
|
|
<span> hours</span>
|
|
</div>
|
|
<field name="allday" attrs="{'readonly': [('id', '!=', False), ('recurrency','=',True)]}"/>
|
|
</group>
|
|
<group>
|
|
<field name="categ_ids" widget="many2many_tags" options="
|
|
{'no_create_edit': True}"/>
|
|
<field name="alarm_ids" widget="many2many_tags" />
|
|
<field name="location" />
|
|
</group>
|
|
|
|
</group>
|
|
<label for="description"/>
|
|
<field name="description"/>
|
|
</page>
|
|
<page name="page_options" string="Options">
|
|
<group>
|
|
<div>
|
|
<group>
|
|
<field name="recurrency"/>
|
|
</group>
|
|
<div attrs="{'invisible': [('recurrency', '=', False)]}">
|
|
<group>
|
|
<label for="interval"/>
|
|
<div class="o_row">
|
|
<field name="interval" attrs="{'required': [('recurrency', '=', True)]}"/>
|
|
<field name="rrule_type" attrs="{'required': [('recurrency', '=', True)]}"/>
|
|
</div>
|
|
<label string="Until" for="end_type"/>
|
|
<div class="o_row">
|
|
<field name="end_type" attrs="{'required': [('recurrency', '=', True)]}"/>
|
|
<field name="count" attrs="{'invisible': [('end_type', '!=', 'count')], 'required': [('recurrency', '=', True)]}"/>
|
|
<field name="final_date" attrs="{'invisible': [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date')]}"/>
|
|
</div>
|
|
</group>
|
|
<group attrs="{'invisible': [('rrule_type', '!=', 'weekly')]}" name="weekdays">
|
|
<field name="mo"/>
|
|
<field name="tu"/>
|
|
<field name="we"/>
|
|
<field name="th"/>
|
|
<field name="fr"/>
|
|
<field name="sa"/>
|
|
<field name="su"/>
|
|
</group>
|
|
<group attrs="{'invisible': [('rrule_type', '!=', 'monthly')]}">
|
|
<label string="Day of Month" for="month_by"/>
|
|
<div class="o_row">
|
|
<field name="month_by"/>
|
|
<field name="day"
|
|
attrs="{'required': [('month_by', '=', 'date'), ('rrule_type', '=', 'monthly')],
|
|
'invisible': [('month_by', '!=', 'date')]}"/>
|
|
<field name="byday" string="The"
|
|
attrs="{'required': [('month_by', '=', 'day'), ('rrule_type', '=', 'monthly')],
|
|
'invisible': [('month_by', '!=', 'day')]}"/>
|
|
<field name="week_list" nolabel="1"
|
|
attrs="{'required': [('month_by', '=', 'day'), ('rrule_type', '=', 'monthly')],
|
|
'invisible': [('month_by', '!=', 'day')]}"/>
|
|
</div>
|
|
</group>
|
|
</div>
|
|
</div>
|
|
<group>
|
|
<field name="privacy"/>
|
|
<field name="show_as"/>
|
|
<field name="rrule" invisible="1" readonly="0" />
|
|
<field name="recurrent_id" invisible="1" />
|
|
</group>
|
|
</group>
|
|
</page>
|
|
|
|
<page name="page_invitations" string="Invitations" groups="base.group_no_one">
|
|
<button name="action_sendmail" type="object" string="Send mail" icon="fa-envelope" class="oe_link"/>
|
|
<field name="attendee_ids" widget="one2many" >
|
|
<tree string="Invitation details" editable="top" create="false" delete="false">
|
|
<field name="partner_id" />
|
|
<field name="state" />
|
|
<field name="email" widget="email"/>
|
|
|
|
<button name="do_tentative" states="needsAction,declined,accepted" string="Uncertain" type="object" icon="fa-asterisk" />
|
|
<button name="do_accept" string="Accept" states="needsAction,tentative,declined" type="object" icon="fa-check text-success"/>
|
|
<button name="do_decline" string="Decline" states="needsAction,tentative,accepted" type="object" icon="fa-times-circle text-danger"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page name="page_misc" string="Misc" groups="base.group_no_one">
|
|
<group>
|
|
<label for="user_id" string="Owner"/>
|
|
<field name="user_id" nolabel="1"/>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="message_ids" widget="mail_thread" />
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_calendar_event_form_popup" model="ir.ui.view">
|
|
<field name="name">calendar.event.form</field>
|
|
<field name="model">calendar.event</field>
|
|
<field name="priority" eval="2"/>
|
|
<field name="arch" type="xml">
|
|
<form string="Meetings">
|
|
<button string="Document" class="oe_stat_button pull-right" icon="fa-bars" type="object" name="action_open_calendar_event" attrs="{'invisible': ['|', ('res_model', '=', False), ('res_id', '=', False)]}"/>
|
|
<field name="res_model" invisible="1" />
|
|
<field name="res_id" invisible="1" />
|
|
<field name="state" invisible="1"/>
|
|
<field name="is_attendee" invisible="1"/>
|
|
<field name="attendee_status" invisible="1"/>
|
|
<group>
|
|
<group>
|
|
<field name="start_date" string="Starting at" attrs="{'invisible': [('allday','=',False)]}"/>
|
|
<field name="start_datetime" string="Starting at" attrs="{'invisible': [('allday','=',True)]}"/>
|
|
<label for="duration" attrs="{'invisible': [('allday','=',True)]}"/>
|
|
<div attrs="{'invisible': [('allday','=',True)]}">
|
|
<field name="duration" widget="float_time" class="oe_inline"/>
|
|
<span> hours</span>
|
|
</div>
|
|
<field name="allday" class="oe_inline" attrs="{'invisible': [('allday','=',False)]}"/>
|
|
<field name="partner_ids" widget="many2manyattendee" string="Attendees"/>
|
|
</group>
|
|
<group>
|
|
<field name="location"/>
|
|
<field name="categ_ids" widget="many2many_tags"/>
|
|
<field name="alarm_ids" widget="many2many_tags" />
|
|
</group>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_calendar_event_calendar" model="ir.ui.view">
|
|
<field name="name">calendar.event.calendar</field>
|
|
<field name="model">calendar.event</field>
|
|
<field name="priority" eval="2"/>
|
|
<field name="arch" type="xml">
|
|
<calendar string="Meetings" date_start="start" date_stop="stop" date_delay="duration" all_day="allday"
|
|
readonly_form_view_id="%(calendar.view_calendar_event_form_popup)s"
|
|
event_open_popup="true"
|
|
event_limit="3"
|
|
color="partner_id">
|
|
<field name="name"/>
|
|
<field name="partner_ids" write_model="calendar.contacts" write_field="partner_id" avatar_field="image_small"/>
|
|
<field name="is_highlighted" invisible="1"/>
|
|
</calendar>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_calendar_event_search" model="ir.ui.view">
|
|
<field name="name">calendar.event.search</field>
|
|
<field name="model">calendar.event</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Meetings">
|
|
<field name="name" string="Meeting" filter_domain="[('name','ilike',self)]"/>
|
|
<field name="partner_ids"/>
|
|
<field name="categ_ids"/>
|
|
<field name="user_id"/>
|
|
<field name="show_as"/>
|
|
<field name="privacy" string="Privacy"/>
|
|
<filter string="My Events" domain="[('user_id','=',uid)]" help="My Events"/>
|
|
<filter string="My Meetings" help="My Meetings" name="mymeetings" context='{"mymeetings": 1}'/>
|
|
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
|
|
<separator/>
|
|
<group expand="0" string="Group By">
|
|
<filter string="Responsible" domain="[]" context="{'group_by':'user_id'}"/>
|
|
<filter string="Availability" domain="[]" context="{'group_by':'show_as'}"/>
|
|
<filter string="Privacy" domain="[]" context="{'group_by':'privacy'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_calendar_event" model="ir.actions.act_window">
|
|
<field name="name">Meetings</field>
|
|
<field name="res_model">calendar.event</field>
|
|
<field name="view_mode">calendar,tree,form</field>
|
|
<field name="view_id" ref="view_calendar_event_calendar"/>
|
|
<field name="search_view_id" ref="view_calendar_event_search"/>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to schedule a new meeting.
|
|
</p><p>
|
|
The calendar is shared between employees and fully integrated with
|
|
other applications such as the employee leaves or the business
|
|
opportunities.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_view_calendar_event_calendar" model="ir.actions.act_window.view">
|
|
<field name="act_window_id" ref="action_calendar_event"/>
|
|
<field name="sequence" eval="1"/>
|
|
<field name="view_mode">calendar</field>
|
|
<field name="view_id" ref="view_calendar_event_calendar"/>
|
|
</record>
|
|
|
|
<record id="action_view_calendar_event_tree" model="ir.actions.act_window.view">
|
|
<field name="act_window_id" ref="action_calendar_event"/>
|
|
<field name="sequence" eval="2"/>
|
|
<field name="view_mode">tree</field>
|
|
<field name="view_id" ref="view_calendar_event_tree"/>
|
|
</record>
|
|
|
|
<record id="action_view_calendar_event_form" model="ir.actions.act_window.view">
|
|
<field name="act_window_id" ref="action_calendar_event"/>
|
|
<field name="sequence" eval="3"/>
|
|
<field name="view_mode">form</field>
|
|
<field name="view_id" ref="view_calendar_event_form"/>
|
|
</record>
|
|
|
|
<!-- Menus -->
|
|
<menuitem
|
|
id="mail_menu_calendar"
|
|
name="Calendar"
|
|
sequence="2"
|
|
action="action_calendar_event"
|
|
web_icon="calendar,static/description/icon.png"
|
|
groups="base.group_user"/>
|
|
|
|
<menuitem
|
|
id="menu_calendar_configuration"
|
|
name="Calendar"
|
|
parent="base.menu_custom"
|
|
groups="base.group_no_one"/>
|
|
|
|
<menuitem
|
|
id="menu_calendar_event_type"
|
|
parent="menu_calendar_configuration"
|
|
action="action_calendar_event_type"
|
|
groups="base.group_no_one"/>
|
|
|
|
<menuitem
|
|
id="menu_calendar_alarm"
|
|
parent="menu_calendar_configuration"
|
|
action="action_calendar_alarm"
|
|
groups="base.group_no_one"/>
|
|
|
|
<!-- called in js from '/js/base_calendar.js' -->
|
|
<record id="action_calendar_event_notify" model="ir.actions.act_window">
|
|
<field name="name">Meetings</field>
|
|
<field name="res_model">calendar.event</field>
|
|
<field name="view_mode">form,calendar,tree</field>
|
|
<field name="view_id" ref="view_calendar_event_form"/>
|
|
</record>
|
|
|
|
</flectra>
|