[IMP] module kanban
[odoo/odoo.git] / openerp / addons / base / module / module_view.xml
index c36beab..6a1ddef 100644 (file)
             <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"/>
+                    <field name="name"/>
+                    <field name="parent_id"/>
+                    <field name="sequence"/>
+                    <field name="description" colspan="4"/>
                 </form>
             </field>
         </record>
             <field name="arch" type="xml">
                 <search string="Search modules">
                     <group col='10' colspan='4'>
-                        <filter icon="terp-check" string="Installed" domain="[('state', 'in', ['installed', 'to upgrade', 'to remove'])]"/>
-                        <filter icon="terp-dialog-close" string="Not Installed" domain="[('state', 'in', ['uninstalled', 'uninstallable'])]"/>
-                        <filter icon="terp-gtk-jump-to-ltr" string="To be upgraded" domain="[('state','in', ['to upgrade', 'to remove', 'to install'])]"/>
-                        <separator orientation="vertical"/>
-                        <filter icon="terp-camera_test" string="Certified" domain="[('certificate','&lt;&gt;', False)]"/>
+                        <filter name="app" icon="terp-check" string="Apps" domain="[('application', '=', 1)]"/>
+                        <filter name="extra" icon="terp-check" string="Extra" domain="[('application', '=', 0)]"/>
+
                         <separator orientation="vertical"/>
-                        <field name="name"/>
-                        <field name="description"/>
-                        <field name="dependencies_id"/>
-                        <field name="state"/>
-                    </group>
-                    <newline/>
-                    <group expand="0" string="Group By..." colspan="11" col="11" groups="base.group_extended">
-                        <filter string="Author" icon="terp-personal" domain="[]" context="{'group_by':'author'}"/>
+                        <filter icon="terp-check" string="Installed" domain="[('state', 'in', ['installed', 'to upgrade', 'to remove'])]"/>
+                        <filter icon="terp-dialog-close" string="Not Installed" domain="[('state', 'in', ['uninstalled', 'uninstallable', 'to install'])]"/>
                         <separator orientation="vertical"/>
-                        <filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category_id'}"/>
-                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+                        <field name="name"
+                            filter_domain="['|', ('name','ilike',self), ('shortdesc','ilike',self)]"
+                            string="Name"/>
+                        <field name="description" string="Keywords"/>
                     </group>
                </search>
             </field>
         </record>
 
+        <record model="ir.ui.view" id="module_view_kanban">
+            <field name="name">Modules Kanban</field>
+            <field name="model">ir.module.module</field>
+            <field name="type">kanban</field>
+            <field name="arch" type="xml">
+
+              <kanban>
+                  <field name="icon"/>
+                  <field name="name"/>
+                  <field name="state"/>
+                  <field name="complexity"/>
+                  <templates>
+                    <t t-name="kanban-box">
+                      <t t-set="installed" t-value="record.state.raw_value == 'installed'"/>
+                      <a type="edit"> 
+                        <img t-attf-src="#{record.icon.value}" class="oe_module_icon"/>
+                      </a>
+                      <div class="oe_module_desc">
+                        <h4><a type="edit"><field name="shortdesc"/></a></h4>
+                        <p>
+                           <field name="category_id"/><br/>
+                           <field name="name"/><br/>
+                           <span t-if="record.complexity.raw_value == 'Expert'" class="oe_label oe_warning">Complex</span>
+                         </p>
+                        <button type="object" name="button_immediate_install" states="uninstalled" class="button">Install</button>
+                        <button t-if="installed" class="label" disabled="disabled">Installed</button>
+                      </div>
+                    </t>
+                  </templates>
+              </kanban>
+
+            </field>
+        </record>
 
         <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="view_mode">tree,form,kanban</field>
             <field name="domain">[('category_id','=',active_id)]</field>
         </record>
         <record id="ir_action_module_category" model="ir.values">
             <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>
 
 
             <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Module">
-                    <field name="name" select="1"/>
-                    <field name="certificate" />
-                    <field colspan="4" name="shortdesc" select="2"/>
-                    <field name="category_id"/>
-                    <field name="demo" readonly="1"/>
+                    <group colspan="4" col="6">
+                        <field name="name"/>
+                        <field name="shortdesc"/>
+                        <field name="certificate" />
+                        <field name="category_id"/>
+                        <field name="complexity"/>
+                        <field name="demo"/>
+                        <field name="icon"/>
+                        <field name="application"/>
+                    </group>
                     <notebook colspan="4">
                         <page string="Module">
                             <group colspan="4" col="4">
                             <separator string="Description" colspan="4"/>
                             <field colspan="4" name="description" select="2" nolabel="1"/>
                             <newline/>
-                            <field name="state" readonly="1"/>
+                            <field name="state"/>
                             <group col="6" colspan="2">
                                 <button name="button_install" states="uninstalled" string="Install" icon="terp-gtk-jump-to-ltr" type="object"/>
                                 <button name="button_install_cancel" states="to install" string="Cancel Install" icon="gtk-cancel" type="object"/>
                                 <button name="button_uninstall" states="installed" string="Uninstall (beta)" icon="terp-dialog-close" type="object"/>
                                 <button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" icon="gtk-cancel" type="object"/>
-                                <button name="button_upgrade" states="installed" string="Schedule Upgrade" icon="terp-gtk-go-back-rtl" type="object"/>
+                                <button name="button_upgrade" states="installed" string="Upgrade" icon="terp-gtk-go-back-rtl" type="object"/>
                                 <button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" icon="gtk-cancel" type="object"/>
                             </group>
                         </page>
                     <field name="name"/>
                     <field name="category_id"/>
                     <field name="shortdesc"/>
+                    <field name="complexity"/>
                     <field name="author"/>
                     <field name="installed_version"/>
                     <field name="latest_version"/>
                     <field name="state"/>
                     <button name="button_install" states="uninstalled" string="Install" icon="terp-gtk-jump-to-ltr" type="object"/>
-                    <button name="button_install_cancel" states="to install" string="Cancel Install" icon="gtk-cancel" type="object"/>
-                    <button name="button_upgrade" states="installed" string="Upgrade" icon="terp-gtk-go-back-rtl" type="object"/>
-                    <button name="button_uninstall" states="installed" string="Uninstall (beta)" icon="terp-dialog-close" type="object"/>
-                    <button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" icon="gtk-cancel" type="object"/>
-                    <button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" icon="gtk-cancel" type="object"/>
                 </tree>
             </field>
         </record>
             <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"/>
+            <field name="view_mode">kanban,tree,form</field>
+            <field name="domain">['!', ('category_id.parent_id','child_of','Hidden')]</field>
+            <field name="context">{'search_default_app':1}</field>
             <field name="search_view_id" ref="view_module_filter"/>
             <field name="help">You can install new modules in order to activate new features, menu, reports or data in your OpenERP instance. To install some modules, click on the button "Install" from the form view and then click on "Start Upgrade".</field>
         </record>