<?xml version="1.0"?>
<form>
                    <field name="activity_category" invisible="1"/>
                    <field name="chaining_type" invisible="1"/>
                    <field name="company_id" invisible="1"/>
                    <field name="has_error" invisible="1"/>
                    <field name="plan_has_user_on_demand" invisible="1"/>
                    <field name="res_ids" invisible="1"/>
                    <field name="plan_available_ids" invisible="1"/>
                    <sheet>
                        <group invisible="not plan_available_ids">
                            <group>
                                <field name="plan_id" options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}" placeholder="Pick an Activity Plan to launch"/>
                            </group>
                        </group>
                        <group invisible="not plan_id">
                            <group>
                                <field name="plan_date" placeholder="Default deadline for the activities..."/>
                                <field name="plan_on_demand_user_id" widget="many2one_avatar_user" invisible="not plan_has_user_on_demand"/>
                            </group>
                            <group>
                                <label for="plan_summary" class="o_form_label" string="Plan summary" colspan="2"/>
                                <field name="plan_summary" colspan="2" nolabel="1" class="text-muted"/>
                            </group>
                        </group>
                        <group invisible="plan_id">
                            <group>
                                <field name="res_model" invisible="1"/>
                                <field name="activity_type_id" required="not plan_id" options="{'no_create': True, 'no_open': True}"/>
                                <field name="summary" placeholder="e.g. Discuss proposal"/>
                            </group>
                            <group>
                                <field name="date_deadline"/>
                                <field name="activity_user_id" widget="many2one_avatar_user" required="not plan_id"/>
                            </group>
                            <field name="note" class="oe-bordered-editor" placeholder="Log a note..."/>
                        </group>
                        <div role="alert" class="alert alert-danger mb8" invisible="not has_error">
                            <field name="error"/>
                        </div>
                    </sheet>
                    <footer invisible="plan_id">
                        <button name="action_schedule_activities" string="Schedule" type="object" class="btn-primary" invisible="has_error" data-hotkey="q"/>
                        <button name="action_schedule_activities_done" string="Schedule &amp; Mark as Done" type="object" invisible="has_error or chaining_type == 'trigger'" class="btn-secondary" data-hotkey="w" context="{'mail_activity_quick_update': True}"/>
                        <button name="action_schedule_activities_done_and_schedule" string="Done &amp; Schedule Next" type="object" invisible="has_error or chaining_type == 'trigger'" class="btn-secondary" data-hotkey="z" context="{'mail_activity_quick_update': True}"/>
                        <button name="action_schedule_activities_done_and_schedule" string="Done &amp; Launch Next" type="object" invisible="has_error or chaining_type == 'suggest'" class="btn-secondary" data-hotkey="z" context="{'mail_activity_quick_update': True}"/>
                        <button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="x"/>
                    </footer>
                    <footer invisible="not plan_id">
                        <button name="action_schedule_plan" string="Schedule" type="object" class="btn-primary" invisible="has_error" data-hotkey="q"/>
                        <button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="x"/>
                    </footer>
                </form>
            