<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>
        <menuitem name="Modules" parent="menu_administration" id="menu_modules"/>
        <record model="ir.ui.view" id="module_view_form">
            <field name="model">ir.module.module</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
              <![CDATA[
                <form string="Module" on_write="on_write">
                    <label name="name"/>
                    <field name="name"/>
                    <label name="shortdesc"/>
                    <field name="shortdesc"/>
                    <notebook colspan="4">
                        <page string="Module" id="module">
                            <separator name="description" colspan="4"/>
                            <field name="description" colspan="4"/>
                            <label name="version"/>
                            <field name="version"/>
                            <label name="author"/>
                            <field name="author"/>
                            <label name="website"/>
                            <field name="website" widget="url"/>
                        </page>
                        <page string="Dependencies" col="1" id="dependencies">
                            <field name="dependencies"/>
                        </page>
                    </notebook>
                    <label name="state"/>
                    <field name="state" readonly="1"/>
                    <group col="2" colspan="2" id="button">
                        <button string="Mark for Upgrade" name="upgrade"
                            type="object"/>
                        <button string="Mark for Uninstallation (beta)" name="uninstall"
                            type="object"/>
                        <button string="Mark for Installation" name="install"
                            type="object"/>
                        <button string="Cancel Installation" name="install_cancel"
                            type="object"/>
                        <button string="Cancel Upgrade" name="upgrade_cancel"
                            type="object"/>
                        <button string="Cancel Uninstallation" name="uninstall_cancel"
                            type="object"/>
                    </group>
                </form>
                ]]>
            </field>
        </record>
        <record model="ir.ui.view" id="module_view_tree">
            <field name="model">ir.module.module</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
              <![CDATA[
                <tree string="Modules" on_write="on_write"
                    colors="If(In(Eval('state', ''), ['to upgrade', 'to install']), 'blue', If(Equal(Eval('state', ''), 'uninstalled'), 'grey', 'black'))">
                    <field name="name"/>
                    <field name="shortdesc"/>
                    <field name="author"/>
                    <field name="version"/>
                    <field name="website"/>
                    <field name="state"/>
                    <field name="description" tree_invisible="1"/>
                    <button string="Mark for Upgrade" name="upgrade"
                        type="object"/>
                    <button string="Mark for Installation" name="install"
                        type="object"/>
                    <button string="Cancel Installation" name="install_cancel"
                        type="object"/>
                    <button string="Cancel Upgrade" name="upgrade_cancel"
                        type="object"/>
                </tree>
              ]]>
            </field>
        </record>
        <record model="ir.action.act_window" id="act_module_form">
            <field name="name">Modules</field>
            <field name="type">ir.action.act_window</field>
            <field name="res_model">ir.module.module</field>
            <field name="domain">[('name', '!=', 'test')]</field>
        </record>
        <record model="ir.action.act_window.view"
            id="act_module_form_view1">
            <field name="sequence" eval="1"/>
            <field name="view" ref="module_view_tree"/>
            <field name="act_window" ref="act_module_form"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_module_form_view2">
            <field name="sequence" eval="2"/>
            <field name="view" ref="module_view_form"/>
            <field name="act_window" ref="act_module_form"/>
        </record>
        <menuitem parent="menu_modules"
            action="act_module_form" id="menu_module_form"/>

        <record model="ir.ui.view" id="module_dependency_view_form">
            <field name="model">ir.module.module.dependency</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Dependency">
                    <label name="module"/>
                    <field name="module"/>
                    <newline/>
                    <label name="name"/>
                    <field name="name"/>
                    <label name="state"/>
                    <field name="state"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="module_dependency_view_list">
            <field name="model">ir.module.module.dependency</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Dependencies">
                    <field name="module"/>
                    <field name="name"/>
                    <field name="state"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="config_wizard_item_view_tree">
            <field name="model">ir.module.module.config_wizard.item</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Config Wizard Items" editable="bottom">
                    <field name="action"/>
                    <field name="sequence"/>
                    <field name="state"/>
                </tree>
                ]]>
            </field>
        </record>
        <record model="ir.action.act_window" id="act_config_wizard_item_form">
            <field name="name">Config Wizard Items</field>
            <field name="res_model">ir.module.module.config_wizard.item</field>
        </record>
        <record model="ir.action.act_window.view"
            id="act_config_wizard_item_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="config_wizard_item_view_tree"/>
            <field name="act_window" ref="act_config_wizard_item_form"/>
        </record>
        <menuitem parent="menu_modules"
            action="act_config_wizard_item_form"
            id="menu_config_wizard_item_form"/>

        <record model="ir.action.wizard" id="act_module_config_wizard">
            <field name="name">Module Configuration</field>
            <field name="wiz_name">ir.module.module.config_wizard</field>
        </record>
        <record model="ir.action.keyword" id="act_module_config_wizard_keyword">
            <field name="action" ref="act_module_config_wizard"/>
            <field name="keyword">form_action</field>
            <field name="model">ir.module.module.config_wizard.item,-1</field>
        </record>


        <record model="ir.ui.view" id="module_config_wizard_first_view_form">
            <field name="model">ir.module.module.config_wizard.first</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Welcome to the module configuration wizard!" col="2">
                    <image name="tryton-dialog-information" xexpand="0"
                        xfill="0"/>
                    <label string="You will be able to configure your installation depending on the modules you have installed."
                        id="configure"
                        yalign="0.0" xalign="0.0" xexpand="1"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="module_config_wizard_other_view_form">
            <field name="model">ir.module.module.config_wizard.other</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Configuration Wizard Next Step!" col="2">
                    <image name="tryton-dialog-information" xexpand="0"
                        xfill="0"/>
                    <field name="percentage" widget="progressbar"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.action.wizard" id="act_module_install_upgrade">
            <field name="name">Perform Pending Installation/Upgrade</field>
            <field name="wiz_name">ir.module.module.install_upgrade</field>
        </record>
        <record model="ir.action.keyword" id="act_module_install_upgrade_keyword1">
            <field name="action" ref="act_module_install_upgrade"/>
            <field name="keyword">form_action</field>
            <field name="model">ir.module.module,-1</field>
        </record>

        <record model="ir.ui.view" id="module_install_upgrade_start_view_form">
            <field name="model">ir.module.module.install_upgrade.start</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="System Upgrade" col="2">
                    <image name="tryton-dialog-information" xexpand="0"
                        xfill="0"/>
                    <group col="1" id="labels">
                        <label string="Your system will be upgraded." id="upgraded"
                            yalign="0.0" xalign="0.0" xexpand="1"/>
                        <label string="Note that this operation my take a few minutes."
                            id="operation"
                            yalign="0.0" xalign="0.0" xexpand="1"/>
                    </group>
                    <separator name="module_info" colspan="2"/>
                    <field name="module_info" colspan="2"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="module_install_upgrade_done_view_form">
            <field name="model">ir.module.module.install_upgrade.done</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="System Upgrade Done" col="2">
                    <image name="tryton-dialog-information" xexpand="0" xfill="0"/>
                    <label string="The modules have been upgraded / installed !"
                        id="modules"
                        yalign="0.0" xalign="0.0" xexpand="1"/>
                </form>
                ]]>
            </field>
        </record>

        <menuitem name="Perform Pending Installation/Upgrade"
            parent="menu_modules"
            action="act_module_install_upgrade"
            id="menu_module_install_upgrade"/>

        <record model="ir.action.wizard" id="act_module_config">
            <field name="name">Configure Modules</field>
            <field name="wiz_name">ir.module.module.config</field>
        </record>

        <record model="ir.module.module.config_wizard.item"
            id="config_wizard_item_module">
            <field name="action" ref="act_module_config"/>
            <field name="sequence" eval="10000"/>
        </record>
    </data>
</tryton>
