parent
bd0cb14602
commit
45cd43be4c
|
@ -591,15 +591,20 @@ class module_configuration(osv.osv_memory):
|
||||||
return item.id
|
return item.id
|
||||||
return False
|
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 = {
|
_columns = {
|
||||||
'name': fields.text('Next Wizard',readonly=True),
|
'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),
|
'item_id':fields.many2one('ir.module.module.configuration.step', 'Next Configuration Wizard',invisible=True, readonly=True),
|
||||||
|
|
||||||
}
|
}
|
||||||
_defaults={
|
_defaults={
|
||||||
|
'progress': _progress_get,
|
||||||
'item_id':_get_action,
|
'item_id':_get_action,
|
||||||
'name':_get_action_name,
|
'name':_get_action_name,
|
||||||
|
|
||||||
}
|
}
|
||||||
def button_skip(self,cr,uid,ids,context=None):
|
def button_skip(self,cr,uid,ids,context=None):
|
||||||
item_obj = self.pool.get('ir.module.module.configuration.step')
|
item_obj = self.pool.get('ir.module.module.configuration.step')
|
||||||
|
|
|
@ -224,23 +224,24 @@
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Next Configuration Step">
|
<form string="Next Configuration Step">
|
||||||
<image name="gtk-dialog-info"/>
|
<image name="gtk-dialog-info"/>
|
||||||
<group>
|
<group>
|
||||||
<separator string="Next Configuration Step" colspan="4"/>
|
<separator string="Next Configuration Step" colspan="4"/>
|
||||||
<field name="name" nolabel="1" colspan="4" width="500"/>
|
<field name="name" nolabel="1" colspan="4" width="500"/>
|
||||||
<separator colspan="4" string=""/>
|
<field name="progress" widget="progressbar"/>
|
||||||
<label string="" colspan="2"/>
|
<separator colspan="4" string=""/>
|
||||||
<group colspan="2" col="2">
|
<label string="" colspan="2"/>
|
||||||
<button icon="gtk-cancel" special="cancel" string="Skip Step"/>
|
<group colspan="2" col="2">
|
||||||
<button icon="gtk-go-forward" name="button_continue" string="Continue" type="object"/>
|
<button icon="gtk-cancel" special="cancel" string="Skip Step"/>
|
||||||
</group>
|
<button icon="gtk-go-forward" name="button_continue" string="Continue" type="object"/>
|
||||||
</group>
|
</group>
|
||||||
|
</group>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_config_wizard_form" model="ir.actions.act_window">
|
<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="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">ir.module.module.configuration.wizard</field>
|
<field name="res_model">ir.module.module.configuration.wizard</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
|
|
Loading…
Reference in New Issue