19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:32:34 +01:00
parent 5faf7397c5
commit 2696f14ed7
721 changed files with 220375 additions and 91221 deletions

View file

@ -6,9 +6,9 @@
<field name="name">calendar.event.type</field>
<field name="model">calendar.event.type</field>
<field name="arch" type="xml">
<tree string="Meeting Types" sample="1" editable="bottom">
<list string="Meeting Types" sample="1" editable="bottom">
<field name="name"/>
</tree>
</list>
</field>
</record>
@ -20,15 +20,15 @@
<!-- Calendar Alarm : -->
<record id="view_calendar_alarm_tree" model="ir.ui.view">
<field name="name">calendar.alarm.tree</field>
<field name="name">calendar.alarm.list</field>
<field name="model">calendar.alarm</field>
<field name="arch" type="xml">
<tree string="Calendar Alarm" sample="1">
<field name="name" invisible="1"/>
<list string="Calendar Alarm" sample="1">
<field name="name" column_invisible="True"/>
<field name="alarm_type"/>
<field name="duration"/>
<field name="interval"/>
</tree>
</list>
</field>
</record>
@ -43,8 +43,9 @@
<field name="name" invisible="1"/>
<field name="alarm_type"/>
<field name="mail_template_id" context="{'default_model': 'calendar.event'}"
attrs="{'invisible': [('alarm_type', '!=', 'email')], 'required': [('alarm_type', '=', 'email')]}"/>
<field name="body" attrs="{'invisible': [('alarm_type', '!=', 'notification')]}"/>
invisible="alarm_type != 'email'"
required="alarm_type == 'email'"/>
<field name="body" invisible="alarm_type != 'notification'"/>
</group>
<group name="right_details">
<label for="duration"/>
@ -52,6 +53,7 @@
<field name="duration"/>
<field name="interval"/>
</div>
<field name="notify_responsible" invisible="alarm_type in ('email', 'notification')"/>
</group>
</group>
</sheet>
@ -62,36 +64,36 @@
<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_mode">tree,form</field>
<field name="view_mode">list,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="name">calendar.event.list</field>
<field name="model">calendar.event</field>
<field name="arch" type="xml">
<tree string="Meetings" sample="1" multi_edit="1">
<list string="Meetings" sample="1" multi_edit="1" js_class="calendar_list_view">
<header>
<button name="action_open_composer" type="object" context="{'composition_mode':'mass_mail'}"
<button name="action_open_composer" type="object" context="{'default_composition_mode':'mass_mail'}"
string="Send Mail"/>
</header>
<field name="name" string="Subject" decoration-bf="1" attrs="{'readonly':[('recurrency','=',True)]}"/>
<field name="name" string="Subject" decoration-bf="1" readonly="recurrency"/>
<field name="start" string="Start Date" readonly="1"/>
<field name="stop" string="End Date" readonly="1"/>
<field name="user_id" widget="many2one_avatar_user" attrs="{'readonly':[('recurrency','=',True)]}" optional="hide"/>
<field name="partner_ids" widget="many2many_tags" attrs="{'readonly':[('recurrency','=',True)]}" optional="show"/>
<field name="alarm_ids" widget="many2many_tags" optional="hide" attrs="{'readonly':[('recurrency','=',True)]}"/>
<field name="categ_ids" widget="many2many_tags" optional="hide" attrs="{'readonly':[('recurrency','=',True)]}" options="{'color_field': 'color'}" />
<field name="user_id" widget="many2one_avatar_user" readonly="recurrency" optional="hide"/>
<field name="partner_ids" widget="many2many_tags" readonly="recurrency" optional="show"/>
<field name="alarm_ids" widget="many2many_tags" optional="hide" readonly="recurrency"/>
<field name="categ_ids" widget="many2many_tags" optional="hide" readonly="recurrency" options="{'color_field': 'color'}"/>
<field name="recurrency" optional="hide" readonly="1"/>
<field name="privacy" optional="hide" attrs="{'readonly':[('recurrency','=',True)]}"/>
<field name="show_as" optional="hide" attrs="{'readonly':[('recurrency','=',True)]}"/>
<field name="location" optional="show" attrs="{'readonly':[('recurrency','=',True)]}"/>
<field name="privacy" optional="hide" readonly="recurrency"/>
<field name="show_as" optional="hide" readonly="recurrency"/>
<field name="location" optional="show" readonly="recurrency"/>
<field name="duration" widget="float_time" readonly="1"/>
<field name="description" optional="hide" attrs="{'readonly':[('recurrency','=',True)]}"/>
<field name="allday" invisible="1"/>
<field name="message_needaction" invisible="1"/>
</tree>
<field name="description" optional="hide" readonly="recurrency"/>
<field name="allday" column_invisible="True"/>
<field name="message_needaction" column_invisible="True"/>
</list>
</field>
</record>
@ -100,166 +102,219 @@
<field name="model">calendar.event</field>
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<form string="Meetings" js_class="calendar_form">
<div attrs="{'invisible': [('recurrence_id','=',False)]}" class="alert alert-info oe_edit_only" role="status">
<form string="Meetings" class="o_calendar_event_form_view" js_class="calendar_form">
<header>
<button name="action_open_composer" class="btn btn-primary" type="object" string="Send email" invisible="not user_can_edit"/>
</header>
<div invisible="not recurrence_id" class="alert alert-info oe_edit_only" role="status">
<p>Edit recurring event</p>
<field name="recurrence_update" widget="radio"/>
</div>
<sheet>
<div class="oe_button_box" name="button_box">
<button string="Document" icon="fa-bars" type="object" name="action_open_calendar_event" attrs="{'invisible': ['|', '|', ('res_model', '=', False), ('res_id', '=', False), ('res_id', '=', 0)]}"/>
<button icon="fa-bars" type="object" name="action_open_calendar_event" invisible="not (res_id and res_model_name)">
<field name="res_model_name"/>
</button>
</div>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="res_model" invisible="1" />
<field name="res_id" invisible="1" />
<field name="attendee_status" invisible="1"/>
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
<field name="active" invisible="1"/>
<field name="user_can_edit" invisible="1"/>
<field name="invalid_email_partner_ids" invisible="1"/> <!-- this field will be used in
many2many_attendees widget -->
<div class="oe_title mb-3">
<div>
<label for="name"/>
</div>
<h1>
<field name="name" placeholder="e.g. Business Lunch"/>
<field name="name" placeholder="e.g. Business Lunch" readonly="not user_can_edit"/>
</h1>
</div>
<div class="d-flex align-items-baseline">
<field name="partner_ids" widget="many2manyattendee"
placeholder="Select attendees..."
context="{'force_email':True}"
domain="[('type','!=','private')]"
class="oe_inline o_calendar_attendees"
/>
<div name="send_buttons" class="sm-2">
<button name="action_open_composer" help="Send Email to attendees" type="object" string=" EMAIL" icon="fa-envelope"/>
</div>
<button name="action_join_video_call" class="btn-primary" help="Join Video Call" type="object" string="Join Video Call" attrs="{'invisible': [('videocall_location', '=', False)]}"/>
</div>
<div class="alert alert-warning o_form_header mt-2" attrs="{'invisible': [('invalid_email_partner_ids', '=', [])]}" role="status">
<p><strong>The following attendees have invalid email addresses and won't receive any email notifications:</strong></p>
<field name="invalid_email_partner_ids" widget="many2manyattendee" class="oe_inline o_calendar_attendees"/>
</div>
<notebook>
<page name="page_details" string="Meeting Details">
<group>
<group>
<group>
<group>
<field name="start_date" widget="daterange" options="{'end_date_field': 'stop_date'}" invisible="not allday" required="allday" readonly="not user_can_edit"/>
<field name="start" widget="daterange" options="{'end_date_field': 'stop'}" invisible="allday" required="not allday" readonly="not user_can_edit"/>
<field name="stop_date" invisible="1"/>
<field name="stop" invisible="1" />
<field name="unavailable_partner_ids" invisible="1" /> <!-- this field will be used in many2many_attendees widget -->
<label for="duration" class="fw-bold text-900 opacity-100"/>
<div class="d-flex gap-2">
<div class="d-flex align-items-start" invisible="allday">
<field name="duration" widget="float_time" string="Duration" class="oe_inline pe-2" readonly="(id and recurrency) or not user_can_edit"/>
<span> hours</span>
</div>
<span invisible="allday" style="white-space: pre;"> or </span>
<div class="d-flex gap-2">
<label for="allday" class=""/>
<field name="allday" class="oe_inline" widget="boolean_toggle" force_save="1" options="{'autosave': False}" readonly="not user_can_edit"/>
</div>
</div>
<field name="start_date" string="Starting at" attrs="{'required': [('allday','=',True)], 'invisible': [('allday','=',False)]}" force_save="1"/>
<field name="stop_date" string="Ending at" attrs="{'required': [('allday','=',True)],'invisible': [('allday','=',False)]}" force_save="1"/>
<field name="start" string="Starting at" attrs="{'required': [('allday','=',False)], 'invisible': [('allday','=',True)]}"/>
<field name="stop" string="Ending At" attrs="{'invisible': [('allday','=',True)]}"/>
<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="event_tz" attrs="{'invisible': [('recurrency', '=', False)]}"/>
<field name="allday" force_save="1"/>
<field name="user_id" widget="many2one_avatar_user"/>
</group>
<group>
<field name="alarm_ids" widget="many2many_tags" options="{'no_quick_create': True}"/>
<field name="location" />
<label for="videocall_location"/>
<div col="2" class="o_row">
<field name="videocall_location" class="oe_inline" string="Videocall URL" widget="CopyClipboardChar" force_save="1" attrs="{'readonly':[('videocall_source','=', 'discuss')]}"/>
<button name="clear_videocall_location" type="object" class="btn btn-link"
attrs="{'invisible': [('videocall_location', '=', False)]}" context="{'recurrence_update': recurrence_update}">
<span class="fa fa-times"></span><span> Clear meeting</span>
<field name="location" placeholder="Online Meeting" readonly="not user_can_edit"/>
<label for="videocall_location" class="opacity-100"/>
<div name="videocall_location_div">
<div class="d-flex">
<field name="videocall_location" string="Video Link" widget="CopyClipboardChar"
force_save="1" class="mb-0" readonly="videocall_source == 'discuss' or not user_can_edit"/>
<div class="d-flex flex-nowrap">
<button name="clear_videocall_location" type="object" class="btn btn-link btn-lg ms-1 px-1 py-0"
invisible="not videocall_location or not user_can_edit" context="{'recurrence_update': recurrence_update}">
<span title="Clear meeting" class="fa fa-times"></span>
</button>
<button name="set_discuss_videocall_location" type="object" class="btn btn-link"
attrs="{'invisible': [('videocall_location', '!=', False)]}" context="{'recurrence_update': recurrence_update}">
<span class="fa fa-plus"></span><span> Add Odoo meeting</span>
<button name="action_join_video_call" class="btn btn-link btn-lg px-1 py-0" help="Join Video Call" type="object"
invisible="not videocall_location or not user_can_edit">
<span title="Join video call" class="fa fa-sign-in"></span>
</button>
<button name="set_discuss_videocall_location" type="object" class="btn btn-link btn-sm px-0 text-nowrap"
invisible="videocall_location or not user_can_edit" context="{'recurrence_update': recurrence_update}">
<span class="fa fa-plus"></span><span> Odoo meeting</span>
</button>
</div>
<field name="videocall_source" invisible="1"/>
<field name="access_token" invisible="1" force_save="1"/>
<field name="categ_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
</group>
</group>
<group>
<field name="description"/>
</group>
</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_col">
<div class="o_row">
<field name="interval" class="oe_inline" attrs="{'required': [('recurrency', '=', True)]}"/>
<field name="rrule_type" attrs="{'required': [('recurrency', '=', True)]}"/>
</div>
<widget name="week_days" attrs="{'invisible': [('rrule_type', '!=', 'weekly')]}"/>
</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="until" attrs="{'invisible': [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date'), ('recurrency', '=', True)]}"/>
</div>
</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': [('recurrency', '=', True), ('month_by', '=', 'day'), ('rrule_type', '=', 'monthly')],
'invisible': [('month_by', '!=', 'day')]}"/>
<field name="weekday" nolabel="1"
attrs="{'required': [('recurrency', '=', True), ('month_by', '=', 'day'), ('rrule_type', '=', 'monthly')],
'invisible': [('month_by', '!=', 'day')]}"/>
</div>
</group>
</div>
</div>
</div>
<field name="res_id" string="Linked to" invisible="not res_id" readonly="1" />
<field name="res_model" invisible="1"/>
<field name="videocall_source" invisible="1"/>
<field name="access_token" invisible="1" force_save="1"/>
</group>
<group>
<field name="current_status" class="o_calendar_form_status_selection_badge" string="Going?"
widget="selection_badge" options="{'horizontal': true, 'size': 'sm'}"
required="should_show_status" readonly="not should_show_status" invisible="not should_show_status"/>
<label for="privacy" string="Status"/>
<div class="d-flex">
<field name="show_as" class="oe_inline me-2" readonly="not user_can_edit" nolabel="1"/>
<field name="privacy" class="oe_inline me-2" readonly="not user_can_edit" nolabel="1" placeholder="User default"
help="Set whether you're available for other simultaneous events and the privacy of this event to others. Manage your default privacy in your user preferences."/>
</div>
<field name="should_show_status" invisible="1"/>
<div class="d-flex mb-2" colspan="2">
<div>
<span class="fw-medium o_form_label">
<field name="attendees_count" class="w-auto oe_inline" nolabel="1"/><span> guests</span>
</span>
<div invisible="not accepted_count and not tentative_count and not declined_count and not awaiting_count"
class="text-muted fw-normal">
<span invisible="not accepted_count" class="me-1">
<field name="accepted_count" class="w-auto oe_inline" nolabel="1"/> Yes
</span>
<span invisible="not tentative_count" class="me-1">
<field name="tentative_count" class="w-auto oe_inline" nolabel="1"/> Maybe
</span>
<span invisible="not declined_count" class="me-1">
<field name="declined_count" class="w-auto oe_inline" nolabel="1"/> No
</span>
<span invisible="not awaiting_count" class="me-1">
<field name="awaiting_count" class="w-auto oe_inline" nolabel="1"/> Awaiting
</span>
</div>
</div>
<div name="send_buttons" class="d-flex gap-2 mb-auto ms-4">
<button name="action_open_composer" help="Send Email to attendees" type="object" string=" EMAIL" icon="fa-envelope" invisible="not user_can_edit"/>
</div>
</div>
<div class="d-flex align-items-baseline" colspan="2">
<field name="partner_ids" widget="many2manyattendee"
placeholder="Select attendees..."
options="{'no_quick_create': True}"
context="{'form_view_ref': 'base.view_partner_simple_form'}"
domain="[('type','!=','private')]"
class="oe_inline"
readonly="not user_can_edit"
/>
</div>
</group>
</group>
<notebook>
<page name="notes" string="Notes">
<field name="notes" type="html" options="{'resizable': false}" readonly="not user_can_edit" placeholder="Add notes about this meeting..."/>
</page>
<page name="options" string="Options">
<group>
<group>
<field name="privacy"/>
<field name="show_as"/>
<field name="user_id" widget="many2one_avatar_user" readonly="not user_can_edit"/>
<field name="categ_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" readonly="not user_can_edit"/>
<label for="description" string="Calendar description" colspan="2"/>
<field name="description"
colspan="2"
nolabel="1"
class="border border-1 rounded"
options="{'height': 120}"
placeholder="Add description"
readonly="not user_can_edit"
/>
</group>
<group>
<field name="alarm_ids" widget="many2many_tags" options="{'no_quick_create': True}" readonly="not user_can_edit"/>
<field name="recurrence_id" invisible="1" />
<field name="rrule_type" invisible="1" />
<label for="recurrency" string="Recurrent"/>
<div class="d-flex align-items-baseline gap-1">
<field name="recurrency" widget="boolean_toggle" options="{'autosave': False}" class="w-auto" readonly="not user_can_edit"/>
<span invisible="not recurrency" class="mx-1">Repeat:</span>
<field name="rrule_type_ui" class="w-auto o_input" invisible="not recurrency" required="recurrency" readonly="not user_can_edit"/>
</div>
<label for="interval" class="fw-bold text-900" invisible="not recurrency or rrule_type_ui != 'custom'"/>
<div class="d-flex gap-1" invisible="not recurrency or rrule_type_ui != 'custom'">
<field name="interval" string="Repeat every" class="oe_inline w-auto o_input_5ch" />
<field name="rrule_type" nolabel="1" class="oe_inline" required="rrule_type_ui == 'custom'"/>
</div>
<span class="fw-bold text-nowrap" invisible="rrule_type_ui not in ['weekly', 'custom'] or (rrule_type_ui == 'custom' and rrule_type != 'weekly')">Repeat on</span>
<div invisible="rrule_type_ui not in ['weekly', 'custom'] or (rrule_type_ui == 'custom' and rrule_type != 'weekly')" ><widget name="calendar_week_days" readonly="not user_can_edit"/></div>
<field name="recurrence_id" invisible="1" />
<label string="Day of Month" for="month_by" class="fw-bold text-900" style="width: fit-content;" invisible="rrule_type_ui not in ['monthly', 'custom'] or (rrule_type_ui == 'custom' and rrule_type != 'monthly')"/>
<div class="d-flex gap-2" invisible="rrule_type_ui not in ['monthly', 'custom'] or (rrule_type_ui == 'custom' and rrule_type != 'monthly')">
<field name="month_by" nolabel="1" class="oe_inline w-auto" required="rrule_type_ui == 'monthly' or rrule_type == 'monthly'"/>
<field name="day" nolabel="1" class="oe_inline w-auto"
required="(rrule_type_ui == 'monthly' or rrule_type == 'monthly') and month_by == 'date'"
invisible="month_by != 'date'"
/>
<field name="byday" string="The" class="oe_inline w-auto" nolabel="1"
required="(rrule_type_ui == 'monthly' or rrule_type == 'monthly') and month_by == 'day'"
invisible="month_by != 'day'"
/>
<field name="weekday" nolabel="1" class="oe_inline w-auto"
required="(rrule_type_ui == 'monthly' or rrule_type == 'monthly') and month_by == 'day'"
invisible="month_by != 'day'"
/>
</div>
<label string="Until" for="end_type" class="fw-bold text-900" invisible="not recurrency"/>
<div class="d-flex gap-2" invisible="not recurrency">
<field name="end_type" class="oe_inline w-auto" nolabel="1" required="recurrency" readonly="not user_can_edit"/>
<field name="count" class="oe_inline w-auto" nolabel="1" invisible="end_type != 'count'" required="recurrency" readonly="not user_can_edit"/>
<field name="until" class="oe_inline w-auto" nolabel="1" invisible="end_type != 'end_date'" readonly="not user_can_edit"
required="recurrency and end_type == 'end_date'"
placeholder="e.g: 12/31/2023"
/>
</div>
<field name="event_tz" invisible="not recurrency" readonly="not user_can_edit"/>
</group>
</group>
</page>
<page name="page_invitations" string="Invitations" groups="base.group_no_one">
<page name="page_invitations" string="Invitations" groups="base.group_no_one" invisible="not user_can_edit">
<button name="action_sendmail" type="object" string="Send Invitations" icon="fa-envelope" class="oe_link"/>
<field name="attendee_ids" widget="one2many" mode="tree,kanban" readonly="1">
<tree string="Invitation details" editable="top" create="false" delete="false">
<field name="attendee_ids" widget="one2many" mode="list,kanban" readonly="1">
<list string="Invitation details" editable="top" create="false" delete="false">
<field name="partner_id" />
<field name="email" widget="email"/>
<field name="phone" widget="phone"/>
<field name="state" />
<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>
<button name="do_tentative" invisible="state not in ('needsAction', 'declined', 'accepted')" string="Uncertain" type="object" icon="fa-asterisk"/>
<button name="do_accept" string="Accept" invisible="state not in ('needsAction', 'tentative', 'declined')" type="object" icon="fa-check text-success"/>
<button name="do_decline" string="Decline" invisible="state not in ('needsAction', 'tentative', 'accepted')" type="object" icon="fa-times-circle text-danger"/>
</list>
<kanban class="o_kanban_mobile" create="false" delete="false">
<field name="partner_id" />
<field name="state" />
<field name="email" widget="email"/>
<templates>
<t t-name="kanban-box">
<div class="d-flex flex-column justify-content-between">
<field name="partner_id"/>
<field name="email" widget="email"/>
<span>Status: <field name="state" /></span>
<div class="text-end">
<button name="do_tentative" states="needsAction,declined,accepted" string="Uncertain" type="object" class="btn fa fa-asterisk"/>
<button name="do_accept" states="needsAction,tentative,declined" string="Accept" type="object" class="btn fa fa-check text-success"/>
<button name="do_decline" states="needsAction,tentative,accepted" string="Decline" type="object" class="btn fa fa-times-circle text-danger"/>
</div>
</div>
<t t-name="card">
<field name="partner_id"/>
<field name="email" widget="email"/>
<span>Status: <field name="state" /></span>
<footer class="justify-content-end">
<button name="do_tentative" invisible="state not in ('needsAction', 'declined', 'accepted')" string="Uncertain" type="object" class="btn fa fa-asterisk"/>
<button name="do_accept" invisible="state not in ('needsAction', 'tentative', 'declined')" string="Accept" type="object" class="btn fa fa-check text-success"/>
<button name="do_decline" invisible="state not in ('needsAction', 'tentative', 'accepted')" string="Decline" type="object" class="btn fa fa-times-circle text-danger"/>
</footer>
</t>
</templates>
</kanban>
@ -267,9 +322,88 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="message_ids" />
<chatter/>
</form>
</field>
</record>
<record id="view_calendar_event_form_quick_create" model="ir.ui.view">
<field name="name">calendar.event.form.quick_create</field>
<field name="model">calendar.event</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<form string="Meetings" class="o_calendar_event_form_quick_create" js_class="calendar_quick_create_form_view">
<field name="invalid_email_partner_ids" invisible="1"/> <!--used in many2many_attendees widget-->
<div class="d-flex align-items-center" colspan="2">
<i class="fa fa-tag text-600" title="Booking Name"/>
<field name="name" nolabel="1"
placeholder="Add Title"
class="w-100 mb-0"
/>
</div>
<div class="d-flex align-items-center" colspan="2">
<i class="fa fa-clock-o text-600" title="Dates"/>
<!--when "stop" is set manually, "duration" is computed. When "start" is changed
"stop" is computed based on the previously-computed "duration". Hence we need to
keep the last computed duration in the front-end model and send it with "start"
when it changes-->
<!--field is also used for custom behavior in default_get, check before removing-->
<field name="duration" invisible="1" force_save="1"/>
<field name="start" nolabel="1"
widget="daterange" options="{'end_date_field': 'stop'}"
placeholder="Dates" class="w-100 mb-0"
invisible="allday"
/>
<field name="start_date" nolabel="1"
widget="daterange" options="{'end_date_field': 'stop_date'}"
placeholder="Dates" class="w-100 mb-0"
invisible="not allday"
/>
<span class="ms-1 w-25">
<field name="allday" class="mb-0" title="All Day" nolabel="1"/>
<span>All day</span>
</span>
<field name="stop" invisible="1"/>
</div>
<div class="d-flex" colspan="2">
<i class="fa fa-user mt-1 text-600" title="Participants"/>
<field name="partner_ids" nolabel="1"
widget="many2many_tags"
placeholder="Participants"
class="w-75 mb-0"
/>
</div>
<div class="d-flex align-items-center" colspan="2">
<i class="fa fa-map text-600" title="Location"/>
<field name="location" nolabel="1"
placeholder="Location"
class="w-100 mb-0"
/>
<!--fields set via the fake front-end only actions must be force saved (see calendar_form)-->
<field name="recurrence_update" invisible="1"/>
<field name="access_token" force_save="1" invisible="1"/>
<field name="videocall_location" force_save="1" invisible="1"/>
<field name="videocall_source" force_save="1" invisible="1"/>
<button name="set_discuss_videocall_location" type="object" class="mx-1 btn-link text-nowrap"
invisible="videocall_location" context="{'recurrence_update': recurrence_update}">
<span class="fa fa-plus me-1"/>Video
</button>
</div>
<div class="d-flex align-items-center" colspan="2" invisible="not videocall_location">
<i class="fa fa-video-camera text-600" title="Videocall URL"/>
<field name="videocall_location" nolabel="1"
widget="CopyClipboardChar"
class="w-100 mb-0 o_field_CopyClipboardChar"
/>
<button name="clear_videocall_location" class="btn btn-sm px-0"><i class="fa fa-remove" title="Remove"/></button>
</div>
<div class="d-flex align-items-center" colspan="2">
<i class="fa fa-lock text-600" title="Visibility"/>
<field name="privacy" nolabel="1" class="w-100 mb-0" placeholder="Visibility"/>
</div>
<div class="d-flex" colspan="2">
<i class="fa fa-sticky-note mt-2 text-600" title="Notes"/>
<field name="notes" nolabel="1" class="w-100" placeholder="Notes" widget="calendar_event_notes_html"/>
</div>
</form>
</field>
@ -283,25 +417,33 @@
<calendar js_class="attendee_calendar" string="Meetings" date_start="start" date_stop="stop" date_delay="duration" all_day="allday"
event_open_popup="true"
event_limit="5"
quick_create="true"
quick_create_view_id="%(calendar.view_calendar_event_form_quick_create)d"
color="partner_ids">
<field name="attendee_status" invisible="1"/>
<field name="partner_ids" options="{'block': True, 'icon': 'fa fa-users'}"
filters="1" widget="many2manyattendee" write_model="calendar.filters"
write_field="partner_id" filter_field="partner_checked" avatar_field="avatar_128"
/>
<field name="videocall_location" widget="url" text="Join Video Call" options="{'icon': 'fa fa-lg fa-video-camera'}" attrs="{'invisible': [('videocall_location', '=', False)]}"/>
<field name="attendees_count" invisible="1"/>
<field name="accepted_count" invisible="1"/>
<field name="declined_count" invisible="1"/>
<field name="user_can_edit" invisible="1"/>
<field name="is_highlighted" invisible="1"/>
<field name="is_organizer_alone" invisible="1"/>
<field name="display_description" invisible="1"/>
<field name="location" attrs="{'invisible': [('location', '=', False)]}"/>
<field name="description" attrs="{'invisible': [('display_description', '=', False)]}"/>
<field name="privacy"/>
<field name="alarm_ids" attrs="{'invisible': [('alarm_ids', '=', [])]}"/>
<field name="categ_ids" attrs="{'invisible': [('categ_ids', '=', [])]}" options="{'color_field': 'color'}" />
<field name="privacy" invisible="1"/>
<field name="effective_privacy" invisible="1"/>
<!-- For recurrence update Dialog -->
<field name="recurrency" invisible="1"/>
<field name="recurrence_update" invisible="1"/>
<field name="partner_id" string="Organizer"/>
<field name="location" invisible="not location" options="{'icon': 'fa fa-map-marker'}"/>
<field name="partner_ids" options="{'block': True, 'icon': 'fa fa-users'}"
filters="1" widget="many2manyattendeeexpandable" write_model="calendar.filters"
write_field="partner_id" filter_field="partner_checked" avatar_field="avatar_128"
/>
<field name="videocall_location" widget="CopyClipboardURL" text="Join Video Call"
options="{'icon': 'fa fa-lg fa-video-camera'}" invisible="not videocall_location"/>
<field name="res_model_name" invisible="not res_model_name"
options="{'icon': 'fa fa-link', 'shouldOpenRecord': true}"/>
<field name="alarm_ids" invisible="not alarm_ids" options="{'icon': 'fa fa-bell-o'}"/>
<field name="categ_ids" invisible="not categ_ids" options="{'icon': 'fa fa-tag', 'color_field': 'color'}"/>
<field name="partner_id" string="Organizer" options="{'icon': 'fa fa-user-o'}"/>
<field name="description" class="text-wrap" invisible="not display_description" options="{'icon': 'fa fa-sticky-note'}"/>
</calendar>
</field>
</record>
@ -325,6 +467,7 @@
<filter string="Busy" name="busy" domain="[('show_as', '=', 'busy')]"/>
<filter string="Free" name="free" domain="[('show_as', '=', 'free')]"/>
<separator/>
<filter string="Default Privacy" name="default" domain="[('privacy', '=', False)]"/>
<filter string="Public" name="public" domain="[('privacy', '=', 'public')]"/>
<filter string="Private" name="private" domain="[('privacy', '=', 'private')]"/>
<filter string="Only Internal Users" name="confidential" domain="[('privacy', '=', 'confidential')]"/>
@ -332,8 +475,10 @@
<filter string="Recurrent" name="recurrent" domain="[('recurrency', '=', True)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<group expand="0" string="Group By">
<group>
<filter string="Responsible" name="responsible" domain="[]" context="{'group_by': 'user_id'}"/>
<separator/>
<filter string="Date" name="group_by_start" domain="[]" context="{'group_by': 'start'}"/>
</group>
</search>
</field>
@ -341,8 +486,9 @@
<record id="action_calendar_event" model="ir.actions.act_window">
<field name="name">Meetings</field>
<field name="path">calendar</field>
<field name="res_model">calendar.event</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_mode">calendar,list,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">
@ -361,13 +507,10 @@
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<notebook colspan="4" position="inside">
<!-- Placeholder container to hold information about external accounts (Google calendar, Microsoft calendar, ...) -->
<page string="Calendar" name="calendar" invisible="1" groups="base.group_system"
attrs="{'invisible': [('share', '=', True)]}">
<group name="calendar_accounts"/>
</page>
</notebook>
<xpath expr="//page[@name='calendar']" position="inside">
<group name="calendar_accounts" groups="base.group_system"/>
</xpath>
</field>
</record>
@ -381,7 +524,7 @@
<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_mode">list</field>
<field name="view_id" ref="view_calendar_event_tree"/>
</record>
@ -392,13 +535,27 @@
<field name="view_id" ref="view_calendar_event_form"/>
</record>
<record id="calendar_settings_action" model="ir.actions.act_window">
<field name="name">Settings</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="context">{'module' : 'calendar', 'bin_size': False}</field>
</record>
<!-- Menus -->
<menuitem
id="mail_menu_calendar"
name="Calendar"
sequence="10"
web_icon="calendar,static/description/icon.png"
groups="base.group_user"/>
<menuitem
id="calendar_event_menu"
name="Calendar"
sequence="1"
action="action_calendar_event"
web_icon="calendar,static/description/icon.svg"
parent="mail_menu_calendar"
groups="base.group_user"/>
<menuitem
@ -407,12 +564,21 @@
name="Configuration"
sequence="40"
action="calendar.action_calendar_event"
groups="base.group_no_one"/>
groups="base.group_system,base.group_no_one"/>
<menuitem
id="menu_calendar_settings"
parent="calendar_menu_config"
name="Settings"
sequence="45"
action="calendar_settings_action"
groups="base.group_system"/>
<menuitem
id="calendar_submenu_reminders"
parent="calendar_menu_config"
name="Reminders"
sequence="50"
action="action_calendar_alarm"
groups="base.group_no_one"/>

View file

@ -7,27 +7,39 @@
<field name="inherit_id" ref="mail.mail_activity_view_form_popup"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date_deadline']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
<attribute name="invisible">activity_category == 'meeting'</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
<attribute name="invisible">activity_category == 'meeting'</attribute>
</xpath>
<xpath expr="//button[@id='mail_activity_schedule']" position="attributes">
<attribute name="attrs">{'invisible': ['|', ('activity_category', 'in', ['meeting', 'phonecall']), ('id', '!=', False)]}</attribute>
<attribute name="invisible">activity_category in ['meeting', 'phonecall'] or id</attribute>
</xpath>
<xpath expr="//button[@id='mail_activity_save']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '!=', 'phonecall'), ('id', '=', False)]}</attribute>
<attribute name="invisible">activity_category != 'phonecall' and not id</attribute>
</xpath>
<xpath expr="//button[@name='action_done']" position="attributes">
<attribute name="attrs">{'invisible': ['|', ('activity_category', '=', 'meeting'), ('chaining_type', '=', 'trigger')]}</attribute>
<attribute name="invisible">activity_category == 'meeting' or chaining_type == 'trigger'</attribute>
</xpath>
<xpath expr="//field[@name='note']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
<attribute name="invisible">activity_category == 'meeting'</attribute>
</xpath>
<xpath expr="//field[@name='summary']" position="attributes">
<attribute name="invisible" add="activity_category == 'meeting'" separator="or"/>
</xpath>
<xpath expr="//field[@name='note']" position="before">
<div invisible="activity_category != 'meeting'" class="text-muted text-center w-100">
<div>
<i class="fa fa-9x fa-calendar p-3" title="Calendar" aria-hidden="true"/>
</div>
<p>Schedule a meeting in your calendar</p>
</div>
</xpath>
<xpath expr="//button[@name='action_close_dialog']" position="before">
<field name="calendar_event_id" invisible="1" />
<button string="Open Calendar"
attrs="{'invisible': ['|', ('activity_category', 'not in', ['meeting', 'phonecall']), ('calendar_event_id', '!=', False)]}"
<button string="Schedule"
close="1"
invisible="activity_category != 'meeting' or calendar_event_id"
name="action_create_calendar_event"
type="object"
class="btn-primary"/>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.calendar</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<app data-string="Calendar" string="Calendar" name="calendar" groups="base.group_system">
<block title="Calendar Settings" name="calendar">
<setting string="Outlook Calendar" documentation="/applications/productivity/calendar/outlook.html" help="Synchronize your calendar with Outlook" id="sync_outlook_calendar_setting">
<field name="module_microsoft_calendar" />
<div class="content-group" invisible="not module_microsoft_calendar" id="msg_module_microsoft_calendar">
<div class="text-warning mt16"><strong>Save</strong> this page and come back here to set up the feature.</div>
</div>
</setting>
<setting string="Google Calendar" documentation="/applications/productivity/calendar/google.html" help="Synchronize your calendar with Google Calendar" id="sync_google_calendar_setting">
<field name="module_google_calendar"/>
<div class="content-group" invisible="not module_google_calendar" id="msg_module_google_calendar">
<div class="text-warning mt16"><strong>Save</strong> this page and come back here to set up the feature.</div>
</div>
</setting>
</block>
</app>
</xpath>
</field>
</record>
</odoo>

View file

@ -1,41 +1,18 @@
<?xml version="1.0"?>
<odoo>
<!-- Partner kanban view inherit -->
<record id="res_partner_kanban_view" model="ir.ui.view">
<field name="name">res.partner.view.kanban.calendar</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<field name="mobile" position="after">
<field name="meeting_count"/>
</field>
<xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
<a t-if="record.meeting_count.value>0" data-type="object" data-name="schedule_meeting"
href="#" class="oe_kanban_action oe_kanban_action_a me-1">
<span class="badge rounded-pill">
<i class="fa fa-fw fa-calendar" aria-label="Meetings" role="img" title="Meetings"/>
<t t-out="record.meeting_count.value"/>
</span>
</a>
</xpath>
</field>
</record>
<!-- Add contextual button on partner form view -->
<record id="view_partners_form" model="ir.ui.view">
<field name="name">res_partner.view.form.calendar</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field eval="1" name="priority"/>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<data>
<div name="button_box" position="inside">
<button class="oe_stat_button" type="object"
name="schedule_meeting"
icon="fa-calendar"
context="{'partner_id': active_id, 'partner_name': name}">
context="{'partner_id': id, 'partner_name': name}">
<field string="Meetings" name="meeting_count" widget="statinfo"/>
</button>
</div>

View file

@ -0,0 +1,27 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- Update Preferences form !-->
<record id="res_users_form_view_calendar_default_privacy" model="ir.ui.view">
<field name="name">res.users.preferences.form.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='tz']" position="after">
<field name="calendar_default_privacy" readonly="0" string="Privacy" invisible="share"/>
</xpath>
</field>
</record>
<!-- Update User form !-->
<record id="res_users_form_view" model="ir.ui.view">
<field name="name">res.users.form.calendar</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='tz']" position="after">
<field name="calendar_default_privacy" readonly="0" string="Privacy" invisible="share"/>
</xpath>
</field>
</record>
</data>
</odoo>