[MERGE]: Merge work of aag for new proposed changes for field restart (WORK IN PROGRESS)
bzr revid: rpa@tinyerp.com-20110411122509-wxuavchvlcm73fsu
This commit is contained in:
commit
712f70c41c
|
@ -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')]" help="Wizards to be Launched"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="state"/>
|
||||
<field name="restart"/>
|
||||
<field name="type"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -1925,7 +1925,7 @@
|
|||
</record>
|
||||
<menuitem id="next_id_11" name="Configuration Wizards" parent="base.menu_config" sequence="1"/>
|
||||
|
||||
<menuitem action="act_ir_actions_todo_form" id="menu_ir_actions_todo_form"
|
||||
<menuitem action="act_ir_actions_ do_form" id="menu_ir_actions_todo_form"
|
||||
parent="next_id_11" groups="base.group_extended" sequence="20"/>
|
||||
|
||||
|
||||
|
|
|
@ -815,14 +815,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')
|
||||
|
|
|
@ -66,6 +66,7 @@ class res_config_configurable(osv.osv_memory):
|
|||
def _next_action(self, cr, uid, context=None):
|
||||
todos = self.pool.get('ir.actions.todo')
|
||||
self.__logger.info('getting next %s', todos)
|
||||
# Don't forget to change the domain in search view, if this condition is changed
|
||||
active_todos = todos.search(cr, uid, [('state','=','open')],
|
||||
limit=1)
|
||||
if active_todos:
|
||||
|
@ -120,7 +121,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