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

        <!-- Top menu item -->
        <menuitem name="Sales"
            id="menu_base_partner"
            groups="base.group_sale_salesman"
            sequence="20"/>

            <menuitem id="base.menu_sales" parent="base.menu_base_partner" name="Sales" sequence="1" />
            <menuitem id="menu_base_config" parent="menu_base_partner" name="Configuration" sequence="30" groups="group_system"/>
                <menuitem id="menu_config_address_book" parent="menu_base_config" name="Address Book" sequence="40" groups="group_system"/>

        <!-- Partner Titles -->
        <record id="view_partner_title_tree" model="ir.ui.view">
            <field name="name">res.partner.title.tree</field>
            <field name="model">res.partner.title</field>
            <field name="arch" type="xml">
                <tree string="Partner Titles">
                    <field name="name"/>
                    <field name="shortcut"/>
                </tree>
            </field>
        </record>
        <record id="view_partner_title_form" model="ir.ui.view">
            <field name="name">res.partner.title.form</field>
            <field name="model">res.partner.title</field>
            <field name="arch" type="xml">
                <form string="Partner Titles" version="7.0">
                    <group col="4">
                        <field name="name"/>
                        <field name="shortcut"/>
                    </group>
                </form>
            </field>
        </record>

        <!--
        <record id="action_partner_title" model="ir.actions.act_window">
            <field name="name">Titles</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner.title</field>
            <field name="view_type">form</field>
        </record>
        <menuitem action="action_partner_title" id="menu_partner_title" parent="base.menu_base_config"/>
        -->

        <record id="action_partner_title_partner" model="ir.actions.act_window">
            <field name="name">Titles</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner.title</field>
            <field name="view_type">form</field>
            <field name="domain">[('domain','=','partner')]</field>
            <field name="context">{'default_domain': 'partner'}</field>
            <field name="help">Manage the partner titles you want to have available in your system. The partner titles is the legal status of the company: Private Limited, SA, etc.</field>
        </record>

        <menuitem action="action_partner_title_partner" id="menu_partner_title_partner" parent="menu_config_address_book" sequence="2" groups="base.group_no_one"/>

        <record id="action_partner_title_contact" model="ir.actions.act_window">
            <field name="name">Contact Titles</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner.title</field>
            <field name="view_type">form</field>
            <field name="domain">[('domain','=','contact')]</field>
            <field name="context">{'default_domain': 'contact'}</field>
            <field name="help">Manage the contact titles you want to have available in your system and the way you want to print them in letters and other documents. Some example: Mr., Mrs. </field>
        </record>

        <menuitem action="action_partner_title_contact" id="menu_partner_title_contact" name="Contact Titles" parent="menu_config_address_book" sequence="3" groups="base.group_no_one"/>

        <!-- Partner -->
        <record id="view_partner_tree" model="ir.ui.view">
            <field name="name">res.partner.tree</field>
            <field name="model">res.partner</field>
            <field eval="8" name="priority"/>
            <field name="arch" type="xml">
                <tree string="Contacts">
                    <field name="name"/>
                    <field name="function" invisible="1"/>
                    <field name="phone"/>
                    <field name="email"/>
                    <field name="user_id" invisible="1"/>
                    <field name="is_company" invisible="1"/>
                    <field name="country" invisible="1"/>
                    <field name="country_id" invisible="1"/>
                    <field name="parent_id" invisible="1"/>
                </tree>
            </field>
        </record>

        <record id="view_partner_simple_form" model="ir.ui.view">
            <field name="name">res.partner.simplified.form</field>
            <field name="model">res.partner</field>
            <field name="arch" type="xml">
                <form string="Contact" version="7.0">
                    <field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image_medium"}'/>
                    <div class="oe_title">
                        <div class="oe_edit_only">
                            <label for="name"/> (
                            <field name="is_company" on_change="onchange_type(is_company)" class="oe_inline"/> <label for="is_company" string="Is a Company?"/>)
                        </div>
                        <h1>
                            <field name="name" default_focus="1" placeholder="Name" />
                        </h1>
                        <field name="parent_id"
                            placeholder="Company"
                            domain="[('is_company', '=', True)]" context="{'default_is_company': True}"
                            attrs="{'invisible': [('is_company','=', True)]}"/>
                        <group>
                            <field name="category_id" widget="many2many_tags" placeholder="Tags..."/>
                            <field name="function" placeholder="e.g. Sales Director"/>
                            <field name="email" required="context.get('force_email', False)"/>
                            <field name="phone"/>
                            <field name="mobile"/>
                        </group>
                    </div>
                </form>
            </field>
        </record>

        <record id="view_partner_form" model="ir.ui.view">
            <field name="name">res.partner.form</field>
            <field name="model">res.partner</field>
            <field eval="1" name="priority"/>
            <field name="arch" type="xml">
                <form string="Partners" version="7.0">
                <sheet>
                    <field name="image" widget='image' class="oe_left oe_avatar" options='{"preview_image": "image_medium", "size": [90, 90]}'/>
                    <div class="oe_title">
                        <div class="oe_edit_only">
                            <label for="name"/> (
                            <field name="is_company" on_change="onchange_type(is_company)" class="oe_inline"/> <label for="is_company" string="Is a Company?"/>)
                        </div>
                        <h1>
                            <field name="name" default_focus="1" placeholder="Name" />
                        </h1>
                        <field name="parent_id"
                            placeholder="Company"
                            domain="[('is_company', '=', True)]" context="{'default_is_company': True, 'default_supplier': supplier, 'default_customer': customer}"
                            attrs="{'invisible': [('is_company','=', True),('parent_id', '=', False)]}"
                            on_change="onchange_address(use_parent_address, parent_id)"/>
                        <field name="category_id" widget="many2many_tags" placeholder="Tags..."/>
                    </div>
                    <div class="oe_right oe_button_box" name="buttons"> </div>

                    <group>
                        <group>
                            <label for="type" attrs="{'invisible': [('parent_id','=', False)]}"/>
                            <div attrs="{'invisible': [('parent_id','=', False)]}" name="div_type">
                                <field class="oe_inline"
                                    name="type"/>
                            </div>

                            <label for="street" string="Address"/>
                            <div>
                                <div class="oe_edit_only">
                                    <field name="use_parent_address" class="oe_inline"
                                           on_change="onchange_address(use_parent_address, parent_id)"
                                           attrs="{'invisible': ['|', ('is_company', '=', True),('parent_id', '=', False)]}"/>
                                    <label for="use_parent_address" attrs="{'invisible': ['|', ('is_company', '=', True), ('parent_id', '=', False)]}"/>
                                </div>
                                <button name="open_parent" type="object" string="(edit company address)" class="oe_link oe_edit_only"
                                        attrs="{'invisible': ['|',('parent_id','=', False),('use_parent_address','=',False)]}"/>
                                <field name="street" placeholder="Street..."  attrs="{'readonly': [('use_parent_address','=',True)]}"/>
                                <field name="street2"  attrs="{'readonly': [('use_parent_address','=',True)]}"/>
                                <div class="address_format">
                                    <field name="city" placeholder="City" style="width: 40%%" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
                                    <field name="state_id" class="oe_no_button" placeholder="State" style="width: 37%%" options='{"no_open": True}' on_change="onchange_state(state_id)" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
                                    <field name="zip" placeholder="ZIP" style="width: 20%%" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
                                </div>
                                <field name="country_id" placeholder="Country" class="oe_no_button" options='{"no_open": True}' attrs="{'readonly': [('use_parent_address','=',True)]}"/>
                            </div>
                            <field name="website" widget="url" placeholder="e.g. www.openerp.com"/>
                        </group>
                        <group>
                            <field name="function" placeholder="e.g. Sales Director"
                                attrs="{'invisible': [('is_company','=', True)]}"/>
                            <field name="phone" placeholder="e.g. +32.81.81.37.00"/>
                            <field name="mobile"/>
                            <field name="fax"/>
                            <field name="email" widget="email"/>
                            <field name="title" options='{"no_open": True}'/>
                        </group>
                    </group>

                    <notebook colspan="4">
                        <page string="Contacts" attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}" autofocus="autofocus">
                            <field name="child_ids" mode="kanban" context="{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_use_parent_address': True}">
                                <kanban>
                                    <field name="color"/>
                                    <field name="name"/>
                                    <field name="title"/>
                                    <field name="email"/>
                                    <field name="parent_id"/>
                                    <field name="is_company"/>
                                    <field name="function"/>
                                    <field name="phone"/>
                                    <field name="street"/>
                                    <field name="street2"/>
                                    <field name="zip"/>
                                    <field name="city"/>
                                    <field name="country_id"/>
                                    <field name="mobile"/>
                                    <field name="fax"/>
                                    <field name="state_id"/>
                                    <field name="has_image"/>
                                    <templates>
                                        <t t-name="kanban-box">
                                            <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
                                            <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" style="position: relative">
                                                <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
                                                <div class="oe_module_vignette">
                                                <a type="open">
                                                    <t t-if="record.has_image.raw_value === true">
                                                        <img t-att-src="kanban_image('res.partner', 'image', record.id.value, {'preview_image': 'image_small'})" class="oe_avatar oe_kanban_avatar_smallbox"/>
                                                    </t>
                                                    <t t-if="record.image and record.image.raw_value !== false">
                                                        <img t-att-src="'data:image/png;base64,'+record.image.raw_value" class="oe_avatar oe_kanban_avatar_smallbox"/>
                                                    </t>
                                                    <t t-if="record.has_image.raw_value === false and (!record.image or record.image.raw_value === false)">
                                                        <t t-if="record.is_company.raw_value === true">
                                                            <img t-att-src='_s + "/base/static/src/img/company_image.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
                                                        </t>
                                                        <t t-if="record.is_company.raw_value === false">
                                                            <img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
                                                        </t>
                                                    </t>
                                                </a>
                                                    <div class="oe_module_desc">
                                                        <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
                                                            <table class="oe_kanban_table">
                                                                <tr>
                                                                    <td class="oe_kanban_title1" align="left" valign="middle">
                                                                        <h4><a type="open"><field name="name"/></a></h4>
                                                                        <i><div t-if="record.function.raw_value">
                                                                            <field name="function"/></div></i>
                                                                        <div><a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value">
                                                                            <field name="email"/>
                                                                        </a></div>
                                                                        <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div>
                                                                        <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div>
                                                                        <div t-if="record.fax.raw_value">Fax: <field name="fax"/></div>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </t>
                                    </templates>
                                </kanban>
                                <form string="Contact" version="7.0">
                                    <sheet>
                                        <field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image_medium"}'/>
                                        <div class="oe_title">
                                            <label for="name" class="oe_edit_only"/>
                                            <h1><field name="name" style="width: 70%%"/></h1>
                                            <field name="category_id" widget="many2many_tags" placeholder="Tags..." style="width: 70%%"/>
                                        </div>
                                        <group>
                                            <field name="function" placeholder="e.g. Sales Director"/>
                                            <field name="email"/>
                                            <field name="phone"/>
                                            <field name="mobile"/>
                                        </group>
                                        <div>
                                            <field name="use_parent_address"/><label for="use_parent_address"/>
                                        </div>
                                        <group>
                                            <label for="type"/>
                                            <div name="div_type">
                                                <field class="oe_inline" name="type"/>
                                            </div>
                                            <label for="street" string="Address" attrs="{'invisible': [('use_parent_address','=', True)]}"/>
                                            <div attrs="{'invisible': [('use_parent_address','=', True)]}" name="div_address">
                                                <field name="street" placeholder="Street..."/>
                                                <field name="street2"/>
                                                <div class="address_format">
                                                    <field name="city" placeholder="City" style="width: 40%%"/>
                                                    <field name="state_id" class="oe_no_button" placeholder="State" style="width: 37%%" options='{"no_open": True}' on_change="onchange_state(state_id)"/>
                                                    <field name="zip" placeholder="ZIP" style="width: 20%%"/>
                                                </div>
                                                <field name="country_id" placeholder="Country" class="oe_no_button" options='{"no_open": True}'/>
                                            </div>
                                        </group>
                                        <field name="supplier" invisible="True"/>
                                        <field name="customer" invisible="True"/>
                                    </sheet>
                                </form>
                            </field>
                        </page>
                        <page string="Internal Notes">
                            <field name="comment" placeholder="Put an internal note..."/>
                        </page>
                        <page string="Sales &amp; Purchases">
                            <group>
                                <group>
                                    <field name="user_id"/>
                                    <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                                </group>
                                <group>
                                    <field name="customer"/>
                                    <field name="supplier"/>
                                </group>
                                <group>
                                    <field name="ref"/>
                                    <field name="lang"/>
                                    <field name="date"/>
                                </group>
                                <group>
                                    <field name="active"/>
                                </group>
                            </group>
                        </page>
                        <!-- The History page becomes visible as soon as there is something to display inside -->
                        <page string="History" name="page_history" invisible="True">
                        </page>
                    </notebook>
                </sheet>
                </form>
            </field>
        </record>

       <record id="view_res_partner_filter" model="ir.ui.view">
            <field name="name">res.partner.select</field>
            <field name="model">res.partner</field>
            <field name="arch" type="xml">
                <search string="Search Partner">
                   <field name="name"
                       filter_domain="['|','|',('name','ilike',self),('parent_id','ilike',self),('ref','=',self)]"/>
                   <filter help="My Partners" icon="terp-personal+" domain="[('user_id','=',uid)]"/>
                   <separator/>
                   <filter string="Persons" name="type_person" domain="[('is_company','=',0)]"/>
                   <filter string="Companies" name="type_company" domain="[('is_company','=',1)]"/>
                   <separator/>
                   <filter string="Customers" name="customer" domain="[('customer','=',1)]" help="Customer Partners"/>
                   <filter string="Suppliers" name="supplier" domain="[('supplier','=',1)]" help="Supplier Partners"/>
                   <separator/>
                   <field name="category_id" string="Tag" filter_domain="[('category_id','ilike', self)]"/>
                   <field name="user_id"/>
                   <field name="parent_id" domain="[('is_company','=',1)]" operator="child_of"/>
                   <group expand="0" string="Group By...">
                       <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}" />
                       <filter string="Company" context="{'group_by': 'parent_id'}"/>
                       <filter string="Country" context="{'group_by': 'country_id'}"/>
                   </group>
               </search>
            </field>
        </record>

        <!-- Partner Kanban View -->
        <record model="ir.ui.view" id="res_partner_kanban_view">
            <field name="name">res.partner.kanban</field>
            <field name="model">res.partner</field>
            <field name="arch" type="xml">
                <kanban>
                    <field name="color"/>
                    <field name="name"/>
                    <field name="title"/>
                    <field name="email"/>
                    <field name="parent_id"/>
                    <field name="is_company"/>
                    <field name="function"/>
                    <field name="phone"/>
                    <field name="street"/>
                    <field name="street2"/>
                    <field name="zip"/>
                    <field name="city"/>
                    <field name="country_id"/>
                    <field name="mobile"/>
                    <field name="state_id"/>
                    <field name="category_id"/>
                    <field name="has_image"/>
                    <templates>
                        <t t-name="kanban-box">
                            <div class="oe_kanban_vignette oe_semantic_html_override">
                                <a type="open">
                                    <t t-if="record.has_image.raw_value === true">
                                        <img t-att-src="kanban_image('res.partner', 'image_small', record.id.value)" class="oe_kanban_image"/>
                                    </t>
                                    <t t-if="record.has_image.raw_value === false">
                                        <t t-if="record.is_company.raw_value === true">
                                            <img t-att-src='_s + "/base/static/src/img/company_image.png"' class="oe_kanban_image"/>
                                        </t>
                                        <t t-if="record.is_company.raw_value === false">
                                            <img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image"/>
                                        </t>
                                    </t>
                                </a>
                                <div class="oe_kanban_details">
                                    <h4 class="oe_partner_heading"><a type="open"><field name="name"/></a></h4>
                                    <div class="oe_kanban_partner_categories"/>
                                    <div class="oe_kanban_partner_links"/>
                                    <ul>
                                        <li t-if="record.parent_id.raw_value and !record.function.raw_value"><field name="parent_id"/></li>
                                        <li t-if="!record.parent_id.raw_value and record.function.raw_value"><field name="function"/></li>
                                        <li t-if="record.parent_id.raw_value and record.function.raw_value"><field name="function"/> at <field name="parent_id"/></li>
                                        <li t-if="record.city.raw_value and !record.country.raw_value"><field name="city"/></li>
                                        <li t-if="!record.city.raw_value and record.country.raw_value"><field name="country"/></li>
                                        <li t-if="record.city.raw_value and record.country.raw_value"><field name="city"/>, <field name="country"/></li>
                                        <li t-if="record.email.raw_value"><a t-attf-href="mailto:#{record.email.raw_value}"><field name="email"/></a></li>
                                    </ul>
                                </div>
                            </div>

                        </t>
                    </templates>
                </kanban>
            </field>
        </record>

        <record id="action_partner_form" model="ir.actions.act_window">
            <field name="name">Customers</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner</field>
            <field name="view_type">form</field>
            <field name="view_mode">kanban,tree,form</field>
            <field name="context">{"search_default_customer":1}</field>
            <field name="search_view_id" ref="view_res_partner_filter"/>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to add a contact in your address book.
              </p><p>
                OpenERP helps you easily track all activities related to
                a customer; discussions, history of business opportunities,
                documents, etc.
              </p>
            </field>
        </record>
        <record id="action_partner_form_view1" model="ir.actions.act_window.view">
            <field eval="0" name="sequence"/>
            <field name="view_mode">kanban</field>
            <field name="view_id" ref="res_partner_kanban_view"/>
            <field name="act_window_id" ref="action_partner_form"/>
        </record>
        <record id="action_partner_form_view2" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_partner_form"/>
            <field name="act_window_id" ref="action_partner_form"/>
        </record>
        <record id="action_partner_tree_view1" model="ir.actions.act_window.view">
            <field name="sequence" eval="1"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_partner_tree"/>
            <field name="act_window_id" ref="action_partner_form"/>
        </record>
        <menuitem id="menu_partner_form" parent="base.menu_sales" action="action_partner_form" sequence="1"/>

        <record id="action_partner_customer_form" model="ir.actions.act_window">
            <field name="name">Customers</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner</field>
            <field name="view_type">form</field>
            <field name="view_mode">kanban,tree,form</field>
            <field name="domain">[('customer','=',1)]</field>
            <field name="context">{'default_customer':1, 'search_default_customer':1}</field>
            <field name="filter" eval="True"/>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to add a contact in your address book.
              </p><p>
                OpenERP helps you easily track all activities related to
                a customer: discussions, history of business opportunities,
                documents, etc.
              </p>
            </field>
        </record>

        <record id="action_partner_supplier_form" model="ir.actions.act_window">
            <field name="name">Suppliers</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner</field>
            <field name="view_type">form</field>
            <field name="domain">[]</field>
            <field name="view_mode">kanban,tree,form</field>
            <field name="context">{'search_default_supplier': 1,'default_customer': 0,'default_supplier': 1}</field>
            <field name="filter" eval="True"/>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to add a contact in your address book.
              </p><p>
                OpenERP helps you easily track all activities related to
                a supplier: discussions, history of purchases,
                documents, etc.
              </p>
            </field>
        </record>

        <record id="action_partner_employee_form" model="ir.actions.act_window">
            <field name="name">Employees</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner</field>
            <field name="view_type">form</field>
            <field name="domain">[('employee','=',1)]</field>
            <field name="context">{'default_customer':0, 'default_supplier':0 , 'default_employee':1}</field>
            <field name="filter" eval="True"/>
        </record>

        <record id="action_partner_other_form" model="ir.actions.act_window">
            <field name="name">Other Partners</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner</field>
            <field name="view_type">form</field>
            <field name="domain">[('supplier','&lt;&gt;',1),('customer','&lt;&gt;',1)]</field>
            <field name="filter" eval="True"/>
        </record>

        <!-- Categories -->
        <record id="view_partner_category_form" model="ir.ui.view">
            <field name="name">Partner Categories</field>
            <field name="model">res.partner.category</field>
            <field name="arch" type="xml">
                <form string="Partner Category" version="7.0">
                    <group col="4">
                        <field name="name"/>
                        <field name="active"/>
                        <field name="parent_id"/>
                    </group>
                </form>
            </field>
        </record>
        <record id="view_partner_category_list" model="ir.ui.view">
            <field name="name">Partner Categories</field>
            <field name="model">res.partner.category</field>
            <field eval="6" name="priority"/>
            <field name="arch" type="xml">
                <tree string="Partner Categories">
                    <field name="complete_name"/>
                </tree>
            </field>
        </record>
        <record id="view_partner_category_tree" model="ir.ui.view">
            <field name="name">res.partner.category.tree</field>
            <field name="model">res.partner.category</field>
            <field name="field_parent">child_ids</field>
            <field name="arch" type="xml">
                <tree toolbar="1" string="Partner Categories">
                    <field name="name"/>
                </tree>
            </field>
        </record>
        <!--
        <record id="action_partner_category" model="ir.actions.act_window">
            <field name="name">Partners by Categories</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner.category</field>
            <field name="view_type">tree</field>
            <field name="view_id" ref="view_partner_category_tree"/>
            <field name="domain">[('parent_id','=',False)]</field>
        </record>
        <menuitem action="action_partner_category" id="menu_partner_category_main" parent="base.menu_address_book" sequence="1"
            groups="base.group_no_one"/>
        -->

        <record id="action_partner_by_category" model="ir.actions.act_window">
            <field name="name">Partner Categories</field>
            <field name="res_model">res.partner</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('category_id','child_of', [active_id])]</field>
            <field name="context">{'category_id':active_id}</field>
            <field name="search_view_id" ref="view_res_partner_filter"/>
        </record>

        <record id="ir_action_partner_by_category" model="ir.values">
            <field eval="'tree_but_open'" name="key2"/>
            <field eval="'res.partner.category'" name="model"/>
            <field name="name">Open partners</field>
            <field eval="'ir.actions.act_window,%d'%action_partner_by_category" name="value"/>
        </record>

        <record id="action_partner_category_form" model="ir.actions.act_window">
            <field name="name">Partner Categories</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner.category</field>
            <field name="view_type">form</field>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to create a new partner category.
              </p><p>
                Manage the partner categories in order to better classify them for tracking and analysis purposes.
                A partner may belong to several categories and categories have a hierarchy structure: a partner belonging to a category also belong to his parent category.
              </p>
            </field>
        </record>

        <menuitem action="action_partner_category_form" id="menu_partner_category_form" name="Partner Tags" sequence="4" parent="menu_config_address_book" groups="base.group_no_one"/>

    </data>
</openerp>
