</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>
#
##############################################################################
+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
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):
<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>