[IMP]:usability improvements
authornch@tinyerp.com <>
Wed, 5 May 2010 04:50:13 +0000 (10:20 +0530)
committernch@tinyerp.com <>
Wed, 5 May 2010 04:50:13 +0000 (10:20 +0530)
bzr revid: nch@tinyerp.com-20100505045013-3yhvi9ownzp7tjpj

bin/addons/base/base_update.xml
bin/addons/base/ir/ir.xml
bin/addons/base/res/res_config.py
bin/addons/base/res/res_config.xml

index 41797f7..1818eb1 100644 (file)
                 </form>
                                <xpath expr="//label[@string='description']"
                         position="attributes">
-                   <attribute name="string">Choose between the simplified interface and the extended one.If you are testing OpenERP or using it for the first time, we suggest you use the simplified interface. It has less options and fields but is easier to understand.You will be able to switch to the extended interface later.</attribute>
+                   <attribute name="string">Choose between the simplified interface and the extended one. If you are testing OpenERP or using it for the first time, We suggest you use the simplified interface. It has less options and fields but is easier to understand. You will be able to switch to the extended interface later.</attribute>
                  </xpath>
                  <xpath expr='//separator[@string="title"]' position='attributes'>
                          <attribute name='string'>Choose Your Interface</attribute>
             <field name="action_id" ref="action_config_simple_view_form"/>
             <field name="sequence">1</field>
         </record>
-
     </data>
 </openerp>
index 77ae764..7eaa78c 100644 (file)
                     <field name="sequence"/>
                     <field name="action_id" select="1"/>
                     <field name="state"/>
+                    <button name="action_id" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
                 </tree>
             </field>
         </record>
index 9899830..e885476 100644 (file)
 #
 ##############################################################################
 
+import os
+import base64
+import random
 from operator import attrgetter
 
 from osv import osv, fields
+import tools
 from tools.translate import _
 import netsvc
 import pooler
 
+
+
 class res_config_configurable(osv.osv_memory):
     ''' Base classes for new-style configuration items
 
@@ -45,11 +51,19 @@ class res_config_configurable(osv.osv_memory):
             return round(open*100./total)
         return 100.
 
+    def _get_image(self, cr, uid, context=None):
+        file_no = str(random.randint(1,3))
+        path = os.path.join('base','res','config_pixmaps/%s.png'%file_no)
+        file_data = tools.file_open(path,'rb').read()
+        return base64.encodestring(file_data)
+
     _columns = dict(
-        progress=fields.float('Configuration Progress', readonly=True),
+        progress = fields.float('Configuration Progress', readonly=True),
+        config_logo = fields.binary('Image', readonly=True),
         )
     _defaults = dict(
-        progress=_progress
+        progress = _progress,
+        config_logo = _get_image
         )
 
     def _next_action(self, cr, uid):
index ca00a49..3981b8f 100644 (file)
@@ -6,29 +6,29 @@
       <field name="type">form</field>
       <field name="arch" type="xml">
        <form>
-               <group colspan="4" col="12">
-               <group colspan="4">
-                       <image name="gtk-dialog-info"/>
+               <group colspan="4" col="8">
+               <group colspan="2">
+                       <field name="config_logo" widget="image" nolabel="1" colspan="1"/>
                        <newline/>
-                       <label align="0.0" string="description" width="200" colspan="4"/>
+                       <label align="0.0" string="description" width="200" colspan="1"/>
                </group>
-               <group colspan="1">
-                       <separator string="vsep" position="vertical" colspan="1" rowspan="12"/>
-               </group>
-               <group>
+               <group colspan="2">
+                       <separator string="vsep" position="vertical" colspan="2" rowspan="12"/>
+               </group>
+               <group colspan="4">
                        <separator string="title" colspan="4"/>
                        <group string="res_config_contents"/>
                </group>
+              </group>
+               <group colspan="4" col="8">
+                       <separator string="" colspan="8"/>
+                       <field name="progress" widget="progressbar" nolabel="1"/>
+                       <label string="" colspan="5"/>
+                                       <button name="action_skip" icon="gtk-goto-last" special="cancel"
+                               type="object" string="Skip" colspan="1"/>
+                       <button name="action_next" icon="gtk-go-forward"
+                                type="object" string="Next" colspan="1"/>
            </group>
-           <group colspan="4" col="8">
-                       <separator string="" colspan="8"/>
-                               <field name="progress" widget="progressbar" colspan= "1" nolabel="1"/>
-                               <label string="" colspan="2"/>
-                               <button name="action_skip" icon="gtk-goto-last" special="cancel"
-                       type="object" string="Skip" colspan="1"/>
-                <button name="action_next" icon="gtk-go-forward"
-                        type="object" string="Next" colspan="1"/>
-               </group>
         </form>
       </field>
     </record>
       <field name="model">res.config.installer</field>
       <field name="type">form</field>
       <field name="arch" type="xml">
-
         <form>
           <group colspan="4">
-
             <group colspan="4" col="12">
               <group colspan="2">
-                <image name="gtk-dialog-info"/>
+                <field name="config_logo" widget="image" nolabel="1" colspan="1"/>
                 <newline/>
                 <label align="0.0" string="description" width="200"/>
               </group>
           </group>
           <group colspan="4" col="8">
                <separator string="" colspan="8"/>
-            <field name="progress" widget="progressbar"/>
-            <label string="" colspan="3"/>
-            <group colspan="1" col="2">
+            <field name="progress" widget="progressbar" nolabel="1"/>
+            <label string="" colspan="5"/>
+            <group colspan="1">
               <button name="action_skip" icon="gtk-goto-last" special="cancel"
                       type="object" string="Skip"/>
             </group>
-            <group colspan="1" col="2">
+            <group colspan="1">
               <button name="action_next" icon="gtk-go-forward"
                       type="object" string="Install Modules"/>
             </group>