<?xml version="1.0"?>
<openerp>
    <data>
    
        <record model="ir.ui.view" id="email_view_document_directory_form">
            <field name="name">document.directory</field>
            <field name="model">document.directory</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="document.view_document_directory_form"/>
            <field name="arch" type="xml">
                <notebook colspan="4" position="inside">
                    <page string="Email Configuration">
                        <field name="email_ids" colspan="4" nolabel="1">
                            <tree string="Email to Document">
                                <field name="name" select="1"/>
                                <field name="user_id" select="1"/>
                            </tree>
                            <form string="Email to Documents">
                                <group col="6" colspan="4">
                                    <field name="name" select="1" colspan="4"/>
                                    <field name="user_id" select="1"/>
                                </group>
                                <notebook colspan="4">
                                    <page string="General Information">
                                        <group col="2" colspan="2">
                                            <separator string="File types to Accept" colspan="2"/>
                                            <field name="accept_files"/>
                                        </group>
                                        <group col="2" colspan="2">
                                            <separator string="POP/IMAP Gateway" colspan="2"/>
                                            <field name="server_id"/>
                                        </group>
                                        <separator string="Description" colspan="4"/>
                                        <field name="note" colspan="4" nolabel="1"/>
                                    </page>
                                </notebook>
                            </form>
                        </field>
                    </page>
                </notebook>
            </field>
        </record>
    
        <record model="ir.ui.view" id="view_document_email_tree">
            <field name="name">document.email.tree</field>
            <field name="model">document.email</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Email to Document">
                    <field name="name" select="1"/>
                    <field name="directory_id" select="1"/>
                    <field name="user_id" select="1"/>
                </tree>
            </field>
        </record>
        
        <record model="ir.ui.view" id="view_document_email_form">
            <field name="name">document.email.form</field>
            <field name="model">document.email</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Email to Documents">
                    <group col="6" colspan="4">
                        <field name="name" select="1"/>
                        <field name="user_id" select="1"/>
                        <field name="directory_id" select="1"/>
                    </group>
                    <notebook colspan="4">
                        <page string="General Information">
                            <group col="2" colspan="2">
                                <separator string="File types to Allow" colspan="2"/>
                                <field name="accept_files"/>
                            </group>
                            <group col="2" colspan="2">
                                <separator string="POP/IMAP Gateway" colspan="2"/>
                                <field name="server_id"/>
                            </group>
                            <separator string="Description" colspan="4"/>
                            <field name="note" colspan="4" nolabel="1"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>
        
        <record model="ir.actions.act_window" id="action_document_email_form">
            <field name="name">Email to Document</field>
            <field name="res_model">document.email</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="view_id" ref="view_document_email_tree"/>
            <field name="context">{}</field>
            <field name="domain">[]</field>
        </record>

    </data>
</openerp>
