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

        <record id="view_inventory_tree" model="ir.ui.view">
            <field name="name">multi_company.default.tree</field>
            <field name="model">multi_company.default</field>
            <field name="type">tree</field>
            <field name="priority" eval="8"/>
            <field name="arch" type="xml">
                <tree string="Multi Company">
                    <field name="company_id" groups="base.group_multi_company"/>
                    <field name="object_id"/>
                    <field name="field_id"/>
                    <field name="expression" />
                    <field name="sequence"/>
                    <field name="company_dest_id"/>
                    <field name="name"/>
                </tree>
            </field>
        </record>
        <record id="view_inventory_form" model="ir.ui.view">
            <field name="name">multi_company.default.form</field>
            <field name="model">multi_company.default</field>
            <field name="type">form</field>
            <field name="priority" eval="8"/>
            <field name="arch" type="xml">
                <form string="Multi Company">
                    <group col="6" colspan="4">
                        <field name="name" colspan="6"/>
                        <separator string="Matching" colspan="6"/>
                        <field name="company_id" groups="base.group_multi_company"/>
                        <field name="object_id"/>
                        <field name="field_id" domain="[('model_id','=',object_id)]"/>
                        <separator string="Condition" colspan="6"/>
                        <field name="expression" colspan="4"/>
                        <field name="sequence"/>
                        <separator string="Returning" colspan="6"/>
                        <field name="company_dest_id"/>
                    </group>
                </form>
            </field>
        </record>

        <record id="view_inventory_search" model="ir.ui.view">
            <field name="name">multi_company.default.search</field>
            <field name="model">multi_company.default</field>
            <field name="type">search</field>
            <field name="priority" eval="8"/>
            <field name="arch" type="xml">
                <search string="Multi Company">
                    <field name="name" select="1"/>
                    <field name="company_id" select="1" widget="selection"/>
                    <field name="company_dest_id" select="1" widget="selection"/>
                    <field name="object_id" select="1"/>
                </search>
            </field>
        </record>

        <record id="action_inventory_form" model="ir.actions.act_window">
            <field name="name">Default Company per Object</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">multi_company.default</field>
            <field name="view_type">form</field>
            <field name="search_view_id" ref="view_inventory_search"/>
        </record>

        <menuitem id="menu_custom_multicompany"
            name="Multi-Companies"
            parent="base.menu_custom"
            groups="base.group_extended"
            sequence="50"/>

        <menuitem id="menu_action_inventory_form" 
            action="action_inventory_form"
            parent="menu_custom_multicompany"/>
    </data>
</openerp>

