<?xml version="1.0"?>
<form string="Meetings" js_class="calendar_form">
                <div attrs="{'invisible': [('recurrence_id','=',False)]}" 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)]}"/>
                    </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"/>
                    <field name="active" invisible="1"/>
                    <div class="oe_title mb-3">
                        <div>
                            <label for="name"/>
                        </div>
                        <h1>
                            <field name="name" placeholder="e.g. Business Lunch"/>
                        </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>

                                    <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> Clear meeting</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> Add 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>
                                <group>
                                    <field name="privacy"/>
                                    <field name="show_as"/>
                                    <field name="recurrence_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 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="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>
                                <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>
                                    </templates>
                                </kanban>
                            </field>
                        </page>
                    </notebook>
                </sheet>
                <div class="oe_chatter">
                    <field name="message_follower_ids"/>
                    <field name="message_ids"/>
                </div>
            </form>
        