<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_outlook_installer" model="ir.ui.view">
            <field name="name">outlook.installer.view</field>
            <field name="model">outlook.installer</field>
            <field name="inherit_id" ref="base.res_config_installer"/>
            <field name="arch" type="xml">
                <data>
                    <form position="attributes">
                        <attribute name="string">Install Outlook Plug-In</attribute>
                    </form>
                    <xpath expr="//footer" position="replace">
                       <footer>
                            <button string="Close" class="oe_link" special="cancel" />
                       </footer>
                    </xpath>
                    <xpath expr="//separator[@string='title']" position="after" version="7.0">
                        <group>
                            <field name="plugin32" widget="url"/>
                            <field name="plugin64" widget="url"/>
                        </group>
                        <separator string="Installation and Configuration Steps"/>
                        <p>Click on the link above to download the installer for either 32 or 64 bits, and execute it.</p>
                        <p>System requirements:</p>
                        <ol>
                            <li> MS Outlook 2005 or above.</li>
                            <li> MS .Net Framework 3.5 or above.</li>
                        </ol>
                    </xpath>
                    <separator string="title" position="attributes">
                        <attribute name="string"></attribute>
                    </separator>
                </data>
            </field>
        </record>

        <record id="action_outlook_installer" model="ir.actions.act_window">
            <field name="name">Install Outlook Plug-In</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">outlook.installer</field>
            <field name="view_id" ref="view_outlook_installer"/>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

        <!-- Sales Configuration -->
        <record id="view_config_outlook_installer" model="ir.ui.view">
            <field name="name">Sales Application</field>
            <field name="model">sale.config.settings</field>
            <field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
            <field name="arch" type="xml">
                <div name="module_plugin_outlook" version="7.0" position="replace">
                    <div>
                        <field name="module_plugin_outlook" class="oe_inline"/>
                        <label for="module_plugin_outlook"/>
                        <button name="%(action_outlook_installer)d" type="action" string="Download and install the plug-in" icon="gtk-execute"
                            attrs="{'invisible': [('module_plugin_outlook','=',False)]}" class="oe_link"/>
                    </div>
                </div>
            </field>
        </record>

        <record id="action_outlook_wizard" model="ir.actions.act_window">
            <field name="name">Install Outlook Plug-In</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">outlook.installer</field>
            <field name="view_id" ref="view_outlook_installer"/>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
            <field name="context">{'menu':True}</field>
        </record>

  <!--        <menuitem id="base.menu_base_config_plugins" name="Plugins" parent="base.menu_base_config" sequence="10"/>-->
        <menuitem id="menu_base_config_plugins_outlook" action="action_outlook_wizard" parent="base.menu_base_config" sequence="5"/>

    </data>
</openerp>
