<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record id="view_general_configuration" model="ir.ui.view">
            <field name="name">General Settings</field>
            <field name="model">base.config.settings</field>
            <field name="arch" type="xml">
                <form string="General Settings" version="7.0" class="oe_form_configuration">
                    <header>
                        <button string="Apply" type="object" name="execute" class="oe_highlight"/>
                        or
                        <button string="Cancel" type="object" name="cancel" class="oe_link"/>
                    </header>
                    <separator string="General Settings"/>
                    <div>
                        <p>
                            <label string="You will find more options in your company details: address for the header and footer, overdue payments texts, etc."/>
                            <button type="object" name="open_company" string="Configure your company data" icon="gtk-execute" class="oe_inline oe_link"/>
                        </p>
                    </div>
                    <group>
                        <label for="id" string="Options"/>
                        <div>
                            <div name="multi_company">
                                <field name="module_multi_company" class="oe_inline"/>
                                <label for="module_multi_company"/>
                            </div>
                        </div>
                    </group>
                    <group>
                        <label for="id" string="Email"/>
                        <div name="email">
                            <div>
                                <button type="action"
                                    name="%(base.action_ir_mail_server_list)d"
                                    string="Configure outgoing email servers" class="oe_link"/>
                            </div>
                        </div>
                    </group>
                    <group>
                        <label for="id" string="Portal access"/>
                        <div>
                            <div>
                                <field name="module_portal" class="oe_inline"/>
                                <label for="module_portal"/>
                                <p attrs="{'invisible': [('module_portal_anonymous','=',False)]}">
                                    When you send a document to a customer
                                    (quotation, invoice), your customer will be
                                    able to signup to get all his documents,
                                    read your company news, check his projects,
                                    etc.
                                </p>
                            </div>
                            <div>
                                <field name="module_portal_anonymous" class="oe_inline"/>
                                <label for="module_portal_anonymous"/> <span class="oe_grey">(company news, jobs, contact form, etc.)</span>
                                <p attrs="{'invisible': [('module_portal_anonymous','=',False)]}">
                                    The public portal is accessible only if you are in a single database mode. You can
                                    launch the OpenERP Server with the option <b>--db-filter=YOUR_DATABAE</b> to do so.
                                    Once activated, the login page will be replaced by the public website.
                                </p>
                            </div>
                        </div>
                    </group>
                    <group>
                        <label for="id" string="Authentication"/>
                        <div>
                            <div>
                                <field name="module_auth_oauth" class="oe_inline"/>
                                <label for="module_auth_oauth"/>
                            </div>
                        </div>
                    </group>
                    <group>
                        <label for="id" string="Import / Export"/>
                        <div>
                            <div>
                                <field name="module_base_import" class="oe_inline"/>
                                <label for="module_base_import"/>
                            </div>
                        </div>
                    </group>
                </form>
            </field>
        </record>

        <record id="action_general_configuration" model="ir.actions.act_window">
            <field name="name">General Settings</field>
            <field name="res_model">base.config.settings</field>
            <field name="view_mode">form</field>
            <field name="target">inline</field>
        </record>
        <menuitem id="menu_general_configuration" parent="base.menu_config"
            sequence="100" action="action_general_configuration"/>

        <!-- Sale config wizard -->
        <record id="view_sale_config_settings" model="ir.ui.view">
            <field name="name">sale settings</field>
            <field name="model">sale.config.settings</field>
            <field name="arch" type="xml">
                <form string="Configure Sales" version="7.0" class="oe_form_configuration">
                    <header>
                        <button string="Apply" type="object" name="execute" class="oe_highlight"/>
                        or
                        <button string="Cancel" type="object" name="cancel" class="oe_link"/>
                    </header>
                    <div name="linkedin">
                        <separator string="Social Network Integration"/>
                        <group name="LinkedIn">
                            <label for="id" string="Contacts"/>
                            <div name="LinkedIn">
                                <div name="module_web_linkedin" class="oe_inline">
                                    <field name="module_web_linkedin"/>
                                    <label for="module_web_linkedin"/>
                                </div>
                            </div>
                        </group>
                    </div>
                    <div name="customer feature" attrs="{'invisible': [('module_sale','=',False)]}">
                        <field name="module_sale" invisible="1"/>
                        <separator string="Quotations and Sales Orders"/>
                        <group name="Customer">
                            <label for="id" string="Customer Features"/>
                            <div name="Customer Features"/>
                        </group>
                        <group name="Sale">
                            <label for="id" string="Sale Features"/>
                            <div name="Sale Features"/>
                        </group>
                    </div>
                    <div name="config_sale">
                        <field name="module_crm" invisible="1"/>
                        <separator string="Emails Integration" attrs="{'invisible': [('module_crm','=',False)]}"/>
                        <p attrs="{'invisible': [('module_crm','=',False)]}">
                            OpenERP allows to automatically create leads (or others documents)
                            from incoming emails. You can automatically synchronize emails with OpenERP
                            using regular POP/IMAP accounts, using a direct email integration script for your
                            email server, or by manually pushing emails to OpenERP using specific
                            plugins for your preferred email application.
                        </p>
                        <group name="On Mail Client" attrs="{'invisible': [('module_crm','=',False)]}">
                            <label for="id" string="On Mail Client"/>
                            <div>
                                <div name="module_plugin_thunderbird" attrs="{'invisible': [('module_crm','=',False)]}" class="oe_inline">
                                    <field name="module_plugin_thunderbird"/>
                                    <label for="module_plugin_thunderbird"/>
                                </div>
                                <div name="module_plugin_outlook" attrs="{'invisible': [('module_crm','=',False)]}">
                                    <field name="module_plugin_outlook" class="oe_inline"/>
                                    <label for="module_plugin_outlook"/>
                                </div>
                            </div>
                        </group>
                    </div>
                    <div name="config_other"/>
                </form>
            </field>
        </record>

        <record id="action_sale_config" model="ir.actions.act_window">
            <field name="name">Configure Sales</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">sale.config.settings</field>
            <field name="view_id" ref="view_sale_config_settings"/>
            <field name="view_mode">form</field>
            <field name="target">inline</field>
        </record>

    </data>
</openerp>
