<?xml version="1.0"?>
<form string="Log an Activity" create="false">
                <sheet string="Activity">
                    <div class="oe_button_box" name="button_box" invisible="1">
                        <button name="action_open_document" string="Open Document" type="object" class="oe_link" icon="fa-file-text-o" attrs="{'invisible': ['|', ('res_model', '=', False), ('res_id', '=', 0)]}"/>
                    </div>
                    <group invisible="1">
                        <field name="activity_category" invisible="1"/>
                        <field name="res_model" invisible="1"/>
                        <field name="res_model_id" invisible="1"/>
                        <field name="res_id" invisible="1"/>
                        <field name="chaining_type" invisible="1"/>
                        <field name="previous_activity_type_id"/>
                        <field name="has_recommended_activities"/>
                    </group>
                    <group attrs="{'invisible': [('has_recommended_activities','=',False)]}">
                        <field name="recommended_activity_type_id" widget="selection_badge" domain="[('previous_type_ids', '=', previous_activity_type_id)]" string="Recommended Activities"/>
                    </group>
                    <group>
                        <group>
                            <field name="activity_type_id" required="1" options="{'no_create': True, 'no_open': True}"/>
                            <field name="summary" placeholder="e.g. Discuss proposal"/>
                        </group>
                        <group>
                            <field name="date_deadline"/>
                            <field name="user_id"/>
                        </group>
                    </group>
                    <field name="note" class="oe-bordered-editor" placeholder="Log a note..."/>
                    <footer>
                        <field name="id" invisible="1"/>
                        <button id="mail_activity_schedule" string="Schedule" name="action_close_dialog" type="object" class="btn-primary" attrs="{'invisible': [('id', '!=', False)]}" data-hotkey="q"/>
                        <button id="mail_activity_save" string="Save" name="action_close_dialog" type="object" class="btn-primary" attrs="{'invisible': [('id', '=', False)]}" data-hotkey="q"/>
                        <button attrs="{'invisible': [('chaining_type', '=', 'trigger')]}" string="Mark as Done" name="action_done" type="object" class="btn-secondary" data-hotkey="w" context="{'mail_activity_quick_update': True}"/>
                        <button attrs="{'invisible': [('chaining_type', '=', 'trigger')]}" string="Done &amp; Schedule Next" name="action_done_schedule_next" type="object" class="btn-secondary" data-hotkey="x" context="{'mail_activity_quick_update': True}"/>
                        <button attrs="{'invisible': [('chaining_type', '=', 'suggest')]}" string="Done &amp; Launch Next" name="action_done_schedule_next" type="object" class="btn-secondary" data-hotkey="x" context="{'mail_activity_quick_update': True}"/>
                        <button string="Discard" class="btn-secondary" special="cancel" data-hotkey="z"/>
                    </footer>
                </sheet>
            </form>
        