<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_res_widget_search" model="ir.ui.view">
            <field name="name">res.widget.search</field>
            <field name="model">res.widget</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search Widget">
                    <field name="title" />
                 </search>
            </field>
        </record>
        <record id="res_widget_form" model="ir.ui.view">
            <field name="name">res.widget.form</field>
            <field name="model">res.widget</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Widgets">
                    <field name="title" colspan="4"/>
                    <field name="content" colspan="4" nolabel="1"/>
                </form>
            </field>
        </record>
        <record id="res_widget_tree" model="ir.ui.view">
            <field name="name">res.widget.tree</field>
            <field name="model">res.widget</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Widgets">
                    <field name="title"/>
                </tree>
            </field>
        </record>

        <record id="res_widget_act_window" model="ir.actions.act_window">
            <field name="name">Homepage Widgets</field>
            <field name="res_model">res.widget</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="search_view_id" ref="view_res_widget_search"/>
        </record>
        <menuitem action="res_widget_act_window" id="menu_res_widget_act_window" parent="base.next_id_2" />
            
        <record id="res_widget_user_tree" model="ir.ui.view">
            <field name="name">res.widget.user.tree</field>
            <field name="model">res.widget.user</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="User Widgets">
                    <field name="sequence" invisible="1"/>
                    <field name="user_id"/>
                    <field name="widget_id"/>
                </tree>
            </field>
        </record>
        <record id="res_widget_user_form" model="ir.ui.view">
            <field name="name">res.widget.user.form</field>
            <field name="model">res.widget.user</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="User Widgets">
                    <field name="widget_id"/>
                    <field name="user_id"/>
                    <field name="sequence"/>
                </form>
            </field>
        </record>
        <record id="res_widget_user_act_window" model="ir.actions.act_window">
            <field name="name">Widgets per User</field>
            <field name="res_model">res.widget.user</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>
        <menuitem action="res_widget_user_act_window" id="menu_res_widget_user_act_window" parent="base.next_id_2"/>

        <record id="view_res_widget_wizard" model="ir.ui.view">
            <field name="name">Homepage Widgets Management</field>
            <field name="model">res.widget.wizard</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
              <form string="Widget Wizard" col="4">
                <field name="widgets_list" colspan="4"/>
                <newline/>
                <separator string="" colspan="6"/>
                <group colspan="6" col="4" >
                  <button special="cancel" string="Cancel" icon="gtk-cancel" />
                  <button name="res_widget_add" string="Add" type="object"/>
                </group>
            </form>
            </field>
        </record>
        <act_window name="Homepage Widgets Management"
                    res_model="res.widget.wizard" src_model="res.widget.user"
                    view_mode="form" target="new" key2="client_action_multi"
                    id="action_res_widget_wizard"/>
    </data>
</openerp>
