<?xml version="1.0" encoding="utf-8"?>
<terp>
    <data>
        
        <!-- Modules Categories -->
        
        <record id="view_module_category_form" model="ir.ui.view">
            <field name="name">ir.module.category.form</field>
            <field name="model">ir.module.category</field>
            <field name="type">form</field>
            <field name="field_parent">child_ids</field>
            <field name="arch" type="xml">
                <form string="Module Category">
                    <field colspan="4" name="name"/>
                    <field colspan="4" name="parent_id"/>
                </form>
            </field>
        </record>
        
        <record id="view_module_category_tree" model="ir.ui.view">
            <field name="name">ir.module.category.tree</field>
            <field name="model">ir.module.category</field>
            <field name="type">tree</field>
            <field name="field_parent">child_ids</field>
            <field name="arch" type="xml">
                <tree string="Module Category">
                    <field name="name"/>
                    <field name="module_nr"/>
                </tree>
            </field>
        </record>
        <record id="action_module_category_tree" model="ir.actions.act_window">
            <field name="name">Categories of Modules</field>
            <field name="res_model">ir.module.category</field>
            <field name="view_type">tree</field>
            <field name="domain">[('parent_id','=',False)]</field>
        </record>
        <menuitem action="action_module_category_tree" id="menu_action_module_category_tree" parent="base.menu_management"/>
        
        <!-- Click on a category -->
        
        <record id="action_module_open_categ" model="ir.actions.act_window">
            <field name="name">Modules</field>
            <field name="res_model">ir.module.module</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('category_id','=',active_id)]</field>
        </record>
        <record id="ir_action_module_category" model="ir.values">
            <field eval="'tree_but_open'" name="key2"/>
            <field eval="'ir.module.category'" name="model"/>
            <field name="name">Categorized Modules</field>
            <field eval="'ir.actions.act_window,%d'%action_module_open_categ" name="value"/>
            <field eval="True" name="object"/>
        </record>
        
        
        <!-- Modules -->
        
        <record id="module_form" model="ir.ui.view">
            <field name="name">ir.module.module.form</field>
            <field name="model">ir.module.module</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Module">
                    <notebook>
                        <page string="Module">
                            <field name="name" select="1"/>
                            <field colspan="4" name="shortdesc" select="2"/>
                            <field colspan="4" name="description" select="2"/>
                            <field name="installed_version"/>
                            <field name="latest_version"/>
                            <field name="author" select="2"/>
                            <field name="website" select="2" widget="url"/>
                            <field name="url" widget="url"/>
                            <field name="published_version"/>
                            <field name="license"/>
                            <field name="demo" readonly="1"/>
                            <newline/>
                            <field name="state" readonly="1" select="1"/>
                            <group col="6" colspan="2">
                                <button name="button_install" states="uninstalled" string="Install" type="object"/>
                                <button name="button_install_cancel" states="to install" string="Cancel Install" type="object"/>
                                <button name="button_uninstall" states="installed" string="Uninstall (beta)" type="object"/>
                                <button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" type="object"/>
                                <button name="button_upgrade" states="installed" string="Upgrade" type="object"/>
                                <button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" type="object"/>
                                <!--
								<button string="Update translations" name="button_update_translations" type="object" states="installed"/>
								-->
                            </group>
                        </page>
                        <page string="Dependencies">
                            <field colspan="4" name="dependencies_id" nolabel="1">
                                <tree string="Dependencies">
                                    <field name="name"/>
                                    <field name="state"/>
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>
        <record id="module_tree" model="ir.ui.view">
            <field name="name">ir.module.module.tree</field>
            <field name="model">ir.module.module</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="blue:state=='to upgrade' or state=='to install';grey:state=='uninstalled' or state=='uninstallable'" string="Modules">
                    <field name="name"/>
                    <field name="shortdesc"/>
                    <field name="author"/>
                    <field name="installed_version"/>
                    <field name="latest_version"/>
                    <field name="published_version"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>
        <record id="open_module_tree" model="ir.actions.act_window">
            <field name="name">Modules</field>
            <field name="res_model">ir.module.module</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain"/>
        </record>
        <menuitem action="open_module_tree" id="menu_module_tree" parent="base.menu_management"/>
        
        <record id="open_module_tree_install" model="ir.actions.act_window">
            <field name="name">Installed modules</field>
            <field name="res_model">ir.module.module</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('state', 'in', ['installed', 'to upgrade', 'to remove'])]</field>
        </record>
        <menuitem action="open_module_tree_install" id="menu_module_tree_install" parent="base.menu_module_tree"/>
        <record id="open_module_tree_uninstall" model="ir.actions.act_window">
            <field name="name">Uninstalled modules</field>
            <field name="res_model">ir.module.module</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('state', 'in', ['uninstalled', 'uninstallable'])]</field>
        </record>
        <menuitem action="open_module_tree_uninstall" id="menu_module_tree_uninstall" parent="base.menu_module_tree"/>
        <record id="open_module_tree_upgrade" model="ir.actions.act_window">
            <field name="name">Modules to be installed, upgraded or removed</field>
            <field name="res_model">ir.module.module</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('state','in', ['to upgrade', 'to remove', 'to install'])]</field>
        </record>
        <menuitem action="open_module_tree_upgrade" id="menu_module_tree_upgrade" parent="base.menu_module_tree"/>
        
        <record id="repository_form" model="ir.ui.view">
            <field name="name">ir.module.repository.form</field>
            <field name="model">ir.module.repository</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Repository">
                    <field name="name" select="1"/>
                    <field name="sequence"/>
                    <field name="url" select="1" widget="url"/>
                    <field name="active" select="1"/>
                    <field colspan="4" name="filter"/>
                </form>
            </field>
        </record>
        <record id="repository_tree" model="ir.ui.view">
            <field name="name">ir.module.repository.tree</field>
            <field name="model">ir.module.repository</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Repository list">
                    <field name="sequence"/>
                    <field name="active"/>
                    <field name="name"/>
                    <field name="url"/>
                </tree>
            </field>
        </record>
        <record id="open_repository_tree" model="ir.actions.act_window">
            <field name="name">Repository list</field>
            <field name="res_model">ir.module.repository</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{'active_test': False}</field>
        </record>
        <menuitem action="open_repository_tree" id="menu_module_repository_tree" parent="base.menu_management"/>
        
        <record id="config_wizard_step_view_tree" model="ir.ui.view">
            <field name="model">ir.module.module.configuration.step</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree editable="bottom" string="Config Wizard Steps">
                    <field name="name" select="1"/>
                    <field name="action_id" select="1"/>
                    <field name="sequence"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>
        <record id="config_wizard_step_view_form" model="ir.ui.view">
            <field name="model">ir.module.module.configuration.step</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form editable="bottom" string="Config Wizard Steps">
                    <field name="name" select="1"/>
                    <field name="action_id" select="1"/>
                    <field name="sequence"/>
                    <field name="state"/>
                    <field colspan="4" name="note"/>
                </form>
            </field>
        </record>
        <record id="act_config_wizard_step_form" model="ir.actions.act_window">
            <field name="name">Config Wizard Steps</field>
            <field name="res_model">ir.module.module.configuration.step</field>
            <field name="view_id" ref="config_wizard_step_view_tree"/>
            <field name="view_type">form</field>
        </record>
        <menuitem id="next_id_11" name="Configuration Wizards" parent="base.menu_custom"/><menuitem action="act_config_wizard_step_form" id="menu_config_wizard_step_form" parent="next_id_11"/>
        
        <record id="view_config_wizard_form" model="ir.ui.view">
            <field name="name">Main Configuration Wizard</field>
            <field name="model">ir.module.module.configuration.wizard</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Next Configuration Step">
					<image name="gtk-dialog-info"/>
					<group>
						<separator string="Next Configuration Step" colspan="4"/>
						<field name="name" nolabel="1" colspan="4" width="500"/>
						<separator colspan="4" string=""/>
						<label string="" colspan="2"/>
						<group colspan="2" col="2">
							<button icon="gtk-cancel" special="cancel" string="Skip Step"/>
							<button icon="gtk-go-forward" name="button_continue" string="Continue" type="object"/>
						</group>
					</group>
                </form>
            </field>
        </record>
        
        <record id="action_config_wizard_form" model="ir.actions.act_window">
            <field name="name">Main Configuration Window</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">ir.module.module.configuration.wizard</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>
        <menuitem action="action_config_wizard_form" id="menu_config_module" parent="base.next_id_11"/>

    </data>
</terp>
