<?xml version="1.0"?>
<form string="KPI Digest">
                <field name="is_subscribed" invisible="1"/>
                <header>
                    <button type="object" name="action_send_manual" string="Send Now" class="oe_highlight" invisible="state == 'deactivated'" groups="base.group_system"/>
                    <button type="object" name="action_deactivate" string="Deactivate" invisible="state == 'deactivated'" groups="base.group_system"/>
                    <button type="object" name="action_activate" string="Activate" class="oe_highlight" invisible="state == 'activated'" groups="base.group_system"/>
                    <field name="state" widget="statusbar" statusbar_visible="0"/>
                </header>
                <sheet>
                    <div class="oe_title">
                        <label for="name" string="Digest Title"/>
                        <h1>
                            <field name="name" placeholder="e.g. Your Weekly Digest"/>
                        </h1>
                    </div>
                    <group>
                        <group>
                            <field name="periodicity" widget="radio" options="{'horizontal': true}"/>
                            <field name="company_id" options="{'no_create': True}" invisible="1"/>
                        </group>
                        <group>
                            <field name="next_run_date" groups="base.group_system"/>
                        </group>
                    </group>
                    <notebook>
                        <page name="kpis" string="KPIs">
                            <group name="kpis">
                                <group name="kpi_general" string="General" groups="base.group_system">
                                    <field name="kpi_res_users_connected"/>
                                    <field name="kpi_mail_message_total"/>
                                </group>
                                <group name="kpi_sales"/>
                                <group name="custom" string="Custom" groups="base.group_system">
                                    <div colspan="2">
                                        <p>Want to add your own KPIs?<br/>
                                        <widget name="documentation_link" path="/applications/general/digest_emails.html#custom-digest-emails" icon="oi oi-arrow-right" label=" Check our Documentation"/></p>
                                    </div>
                                </group>
                            </group>
                        </page>
                        <page name="recipients" string="Recipients" groups="base.group_system">
                            <field name="user_ids" options="{'no_create': True}">
                                <list string="Recipients">
                                    <field name="name"/>
                                    <field name="email" string="Email Address"/>
                                </list>
                            </field>
                        </page>
                    </notebook>
                </sheet>
            </form>
        