[IMP]SERVER:Change Field Restart To Type
bzr revid: aag@tinyerp.co.in-20110408122657-hlsz5alctovlu6i7
This commit is contained in:
parent
d3b7007425
commit
da001be94f
|
@ -358,7 +358,7 @@
|
|||
|
||||
<record id="config_wizard_action_config_user_form" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_config_access_other_user"/>
|
||||
<field name="restart">never</field>
|
||||
<field name="type">normal</field>
|
||||
<field name="target">current</field>
|
||||
<field name="sequence">1000</field>
|
||||
<field name="state">skip</field>
|
||||
|
@ -408,12 +408,12 @@
|
|||
<record id="config_wizard_step_user" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_config_user_form"/>
|
||||
<field name="sequence">10</field>
|
||||
<field name="restart">never</field>
|
||||
<field name="type">normal</field>
|
||||
<field name="state">done</field>
|
||||
</record>
|
||||
<record id="config_wizard_simple_view" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_config_simple_view_form"/>
|
||||
<field name="restart">on_trigger</field>
|
||||
<field name="type">special</field>
|
||||
<field name="sequence">1</field>
|
||||
<field name="state">skip</field>
|
||||
</record>
|
||||
|
@ -467,7 +467,7 @@
|
|||
|
||||
<record id="config_action_user_preferences_config_form" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_user_preferences_config_form"/>
|
||||
<field name="restart">on_trigger</field>
|
||||
<field name="type">special</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -1868,7 +1868,7 @@
|
|||
<tree editable="bottom" string="Config Wizard Steps">
|
||||
<field name="sequence"/>
|
||||
<field name="action_id"/>
|
||||
<field name="restart"/>
|
||||
<field name="type"/>
|
||||
<field name="state" readonly="1"/>
|
||||
<button name="action_launch" states="open" string="Launch" type="object" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
<button name="action_open" states="cancel,skip,done"
|
||||
|
@ -1886,7 +1886,7 @@
|
|||
<form editable="bottom" string="Config Wizard Steps">
|
||||
<group colspan="4" col="6">
|
||||
<field name="action_id"/>
|
||||
<field name="restart"/>
|
||||
<field name="type"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
<separator string="Groups" colspan="4"/>
|
||||
|
@ -1908,10 +1908,10 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Actions">
|
||||
<filter string="To Do" name="todo" icon="terp-camera_test" domain=" ['|',('state','=','open'),'&',('state','=','skip'),('restart','=','on_trigger')]" help="Todo State Or (Skip State And ontrigger Restart)"/>
|
||||
<filter string="To Do" name="todo" icon="terp-camera_test" domain=" ['|',('state','=','open'),'&',('state','=','skip'),('type','=','special')]" help="Todo State Or (Skip State And Special Type"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="state"/>
|
||||
<field name="restart"/>
|
||||
<field name="type"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -1921,7 +1921,7 @@
|
|||
<field name="res_model">ir.actions.todo</field>
|
||||
<field name="view_id" ref="ir_actions_todo_tree"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="help">The configuration wizards are used to help you configure a new instance of OpenERP. They are launched during the installation of new modules, but you can choose to restart some wizards manually from this menu.</field>
|
||||
<field name="help">The configuration wizards are used to help you configure a new instance of OpenERP. They are launched during the installation of new modules, but you can choose to type some wizards manually from this menu.</field>
|
||||
</record>
|
||||
<menuitem id="next_id_11" name="Configuration Wizards" parent="base.menu_config" sequence="1"/>
|
||||
|
||||
|
|
|
@ -794,14 +794,14 @@ class ir_actions_todo(osv.osv):
|
|||
'sequence': fields.integer('Sequence'),
|
||||
'state': fields.selection(TODO_STATES, string='State', required=True),
|
||||
'name':fields.char('Name', size=64),
|
||||
'restart': fields.selection([('on_trigger','On Trigger'),('always','Always'),('never','Never')],'Restart',required=True),
|
||||
'type': fields.selection([('special','Special'),('normal','Normal'),('normal_recurring','Normal Recurring')],'Type',required=True),
|
||||
'groups_id':fields.many2many('res.groups', 'res_groups_action_rel', 'uid', 'gid', 'Groups'),
|
||||
'note':fields.text('Text', translate=True),
|
||||
}
|
||||
_defaults={
|
||||
'state': 'open',
|
||||
'sequence': 10,
|
||||
'restart': 'on_trigger',
|
||||
'type': 'special',
|
||||
}
|
||||
_order="sequence,name,id"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class base_module_configuration(osv.osv_memory):
|
|||
_name = "base.module.configuration"
|
||||
|
||||
def start(self, cr, uid, ids, context=None):
|
||||
todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', '|', ('restart','=','always'), ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'on_trigger')])
|
||||
todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', '|', ('type','=','normal_recurring'), ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('type', '=', 'special')])
|
||||
if not todo_ids:
|
||||
# When there is no wizard todo it will display message
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
|
|
|
@ -120,7 +120,7 @@ class res_config_configurable(osv.osv_memory):
|
|||
def start(self, cr, uid, ids, context=None):
|
||||
ids2 = self.pool.get('ir.actions.todo').search(cr, uid, [], context=context)
|
||||
for todo in self.pool.get('ir.actions.todo').browse(cr, uid, ids2, context=context):
|
||||
if (todo.restart=='always'):
|
||||
if (todo.type=='normal_recurring'):
|
||||
todo.write({'state':'open'})
|
||||
return self.next(cr, uid, ids, context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue