summaryrefslogtreecommitdiff
path: root/bin/addons/base/module
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2008-08-25 01:22:18 +0200
committerFabien Pinckaers <fp@tinyerp.com>2008-08-25 01:22:18 +0200
commit45cd43be4ca32fdc5d81187784dc4ec1fbb0cc8c (patch)
treee42dd96f95f8f7a7db7de6505907fc2399413183 /bin/addons/base/module
parentbd0cb14602091a9ae003f241f849e015d1fb9a68 (diff)
Small modifs
bzr revid: fp@tinyerp.com-20080824232218-316vtgkh1ww0vu5n
Diffstat (limited to 'bin/addons/base/module')
-rw-r--r--bin/addons/base/module/module.py9
-rw-r--r--bin/addons/base/module/module_view.xml25
2 files changed, 20 insertions, 14 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py
index 85f2f3b086a..fdd8af2d488 100644
--- a/bin/addons/base/module/module.py
+++ b/bin/addons/base/module/module.py
@@ -591,15 +591,20 @@ class module_configuration(osv.osv_memory):
return item.id
return False
+ def _progress_get(self,cr,uid, context={}):
+ total = self.pool.get('ir.module.module.configuration.step').search_count(cr, uid, [], context)
+ todo = self.pool.get('ir.module.module.configuration.step').search_count(cr, uid, [('state','<>','open')], context)
+ return max(5.0,round(todo*100/total))
+
_columns = {
'name': fields.text('Next Wizard',readonly=True),
+ 'progress': fields.float('Configuration Progress', readonly=True),
'item_id':fields.many2one('ir.module.module.configuration.step', 'Next Configuration Wizard',invisible=True, readonly=True),
-
}
_defaults={
+ 'progress': _progress_get,
'item_id':_get_action,
'name':_get_action_name,
-
}
def button_skip(self,cr,uid,ids,context=None):
item_obj = self.pool.get('ir.module.module.configuration.step')
diff --git a/bin/addons/base/module/module_view.xml b/bin/addons/base/module/module_view.xml
index 5b14c59e9f0..a482a8ee2e3 100644
--- a/bin/addons/base/module/module_view.xml
+++ b/bin/addons/base/module/module_view.xml
@@ -224,23 +224,24 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Next Configuration Step">
- <image name="gtk-dialog-info"/>
- <group>
- <separator string="Next Configuration Step" colspan="4"/>
- <field name="name" nolabel="1" colspan="4" width="500"/>
- <separator colspan="4" string=""/>
- <label string="" colspan="2"/>
- <group colspan="2" col="2">
- <button icon="gtk-cancel" special="cancel" string="Skip Step"/>
- <button icon="gtk-go-forward" name="button_continue" string="Continue" type="object"/>
- </group>
- </group>
+ <image name="gtk-dialog-info"/>
+ <group>
+ <separator string="Next Configuration Step" colspan="4"/>
+ <field name="name" nolabel="1" colspan="4" width="500"/>
+ <field name="progress" widget="progressbar"/>
+ <separator colspan="4" string=""/>
+ <label string="" colspan="2"/>
+ <group colspan="2" col="2">
+ <button icon="gtk-cancel" special="cancel" string="Skip Step"/>
+ <button icon="gtk-go-forward" name="button_continue" string="Continue" type="object"/>
+ </group>
+ </group>
</form>
</field>
</record>
<record id="action_config_wizard_form" model="ir.actions.act_window">
- <field name="name">Main Configuration Window</field>
+ <field name="name">Configuration Wizard</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.module.module.configuration.wizard</field>
<field name="view_type">form</field>