[FIX,IMP]: base: Improvement in search and form view of Configuration Wizards

bzr revid: rpa@tinyerp.com-20100823064309-2rpmfeqvwdupsozg
This commit is contained in:
rpa (Open ERP) 2010-08-23 12:13:09 +05:30
parent 661c62a2a8
commit ae3ee2090d
2 changed files with 25 additions and 9 deletions

View File

@ -1532,15 +1532,25 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form editable="bottom" string="Config Wizard Steps">
<field name="sequence"/>
<field name="action_id" select="1"/>
<field name="restart"/>
<field name="state"/>
<notebook colspan="4">
<page string="Groups">
<field name="groups_id" nolabel="1" colspan="4"/>
</page>
</notebook>
<group colspan="4" col="6">
<field name="sequence"/>
<field name="action_id" select="1"/>
<field name="restart"/>
</group>
<separator string="Groups" colspan="4"/>
<field name="groups_id" nolabel="1" colspan="4"/>
<separator string="State" colspan="4"/>
<group colspan="4" col="4">
<field name="state" colspan="2" readonly="1"/>
<!--TO CHECK: This is working in tree view but not here in form view -->
<button name="action_id" states="open,skip"
string="Launch" type="action"
icon="gtk-execute"
help="Launch Configuration Wizard" />
<button name="action_open" states="cancel,done"
string="Set as Todo" type="object"
icon="gtk-convert"/>
</group>
</form>
</field>
</record>
@ -1552,6 +1562,7 @@
<field name="arch" type="xml">
<search string="Search Actions">
<filter string="To Do" name="todo" icon="terp-camera_test" domain=" ['|',('state','=','open'),'&amp;',('state','=','skip'),('restart','=','onskip')]" help="Todo State Or (Skip State And Onskip Restart)"/>
<separator orientation="vertical"/>
<field name="state"/>
<field name="restart"/>
</search>

View File

@ -754,6 +754,11 @@ class ir_actions_todo(osv.osv):
'restart': lambda *a: 'always',
}
_order="sequence,id"
def action_open(self, cr, uid, ids, context=None):
""" Sets configuration wizard in TODO state"""
return self.write(cr, uid, ids, {'state': 'open'}, context=context)
ir_actions_todo()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: