[IMP] migrate res.user and res.config.view to the new configurator

bzr revid: xmo@tinyerp.com-20091203130904-9ndprgw23f4jc0ne
This commit is contained in:
Xavier Morel
2009-12-03 14:09:04 +01:00
parent 40050f1230
commit 08f7728ff8
2 changed files with 8 additions and 29 deletions
+3
View File
@@ -847,6 +847,9 @@ class ir_actions_configurator(osv.osv_memory):
'type': action.type,
'target': action.target,
}
self.logger.notifyChannel(
'actions', netsvc.LOG_INFO,
'all configuration actions have been executed')
return {'type': 'ir.actions.act_window_close'}
ir_actions_configurator()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+5 -29
View File
@@ -255,22 +255,11 @@ class users(osv.osv):
return dataobj.browse(cr, uid, data_id, context).res_id
def action_next(self,cr,uid,ids,context=None):
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
return self.pool.get('ir.actions.configurator').next(cr, uid)
def action_continue(self,cr,uid,ids,context={}):
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
return self.pool.get('ir.actions.configurator').next(cr, uid)
def action_new(self,cr,uid,ids,context={}):
return {
'view_type': 'form',
@@ -301,13 +290,7 @@ class res_config_view(osv.osv_memory):
}
def action_cancel(self,cr,uid,ids,conect=None):
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
return self.pool.get('ir.actions.configurator').next(cr, uid)
def action_set(self, cr, uid, ids, context=None):
res=self.read(cr,uid,ids)[0]
users_obj = self.pool.get('res.users')
@@ -318,14 +301,7 @@ class res_config_view(osv.osv_memory):
users_obj.write(cr, uid, [uid],{
'groups_id':[(4,group_ids[0])]
}, context=context)
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'ir.actions.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
return self.pool.get('ir.actions.configurator').next(cr, uid)
res_config_view()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: