[IMP]:usability improvements

bzr revid: nch@tinyerp.com-20100505045013-3yhvi9ownzp7tjpj
This commit is contained in:
nch@tinyerp.com 2010-05-05 10:20:13 +05:30
parent 7151076eee
commit 54a79c4544
4 changed files with 40 additions and 28 deletions

View File

@ -284,7 +284,7 @@
</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>
@ -325,6 +325,5 @@
<field name="action_id" ref="action_config_simple_view_form"/>
<field name="sequence">1</field>
</record>
</data>
</openerp>

View File

@ -1370,6 +1370,7 @@
<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>

View File

@ -19,13 +19,19 @@
#
##############################################################################
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):

View 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>
@ -60,13 +60,11 @@
<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>
@ -81,13 +79,13 @@
</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>