[MERGE] trunk-application_setting_cleanup-atp (fix for cancel button)
bzr revid: rco@openerp.com-20120626075118-6ryztze32z5jqu6s
This commit is contained in:
commit
4a1cde1df6
|
@ -541,4 +541,12 @@ class res_config_settings(osv.osv_memory):
|
|||
'tag': 'reload',
|
||||
}
|
||||
|
||||
def cancel(self, cr, uid, ids, context=None):
|
||||
# ignore the current record, and send the action to reopen the view
|
||||
act_window = self.pool.get('ir.actions.act_window')
|
||||
action_ids = act_window.search(cr, uid, [('res_model', '=', self._name)])
|
||||
if action_ids:
|
||||
return act_window.read(cr, uid, action_ids[0], [], context=context)
|
||||
return {}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue