parent
bd0cb14602
commit
45cd43be4c
|
@ -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')
|
||||
|
|
|
@ -228,6 +228,7 @@
|
|||
<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">
|
||||
|
@ -240,7 +241,7 @@
|
|||
</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>
|
||||
|
|
Loading…
Reference in New Issue