[imp] implement a complete next() method and use it in action_next and action_skip, make it part of res.config's official API

bzr revid: xmo@tinyerp.com-20091210080650-1gp80tjpepz4wee2
This commit is contained in:
Xavier Morel 2009-12-10 09:06:50 +01:00
parent ec6ac388a0
commit a636a7ab0a
1 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ class res_config_configurable(osv.osv_memory):
'actions', netsvc.LOG_INFO,
'all configuration actions have been executed')
return {'type': 'ir.actions.act_window_close'}
def next(self, cr, uid, *args, **kwargs):
def next(self, cr, uid, ids, context=None):
return self._next(cr, uid)
def execute(self, cr, uid, ids, context=None):
@ -96,12 +96,12 @@ class res_config_configurable(osv.osv_memory):
def action_next(self, cr, uid, ids, context=None):
next = self.execute(cr, uid, ids, context=None)
if next: return next
return self._next(cr, uid)
return self.next(cr, uid, ids, context=context)
def action_skip(self, cr, uid, ids, context=None):
next = self.cancel(cr, uid, ids, context=None)
if next: return next
return self._next(cr, uid)
return self.next(cr, uid, ids, context=context)
res_config_configurable()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: