[IMP] exceptions tests: use another xml_menu_id that leads directly to the tests wizard.

also use an int instead of a tuple in the exception's constructor

bzr revid: abo@openerp.com-20130220153737-2mvc6aonxsyuv4u6
This commit is contained in:
Antonin Bourguignon 2013-02-20 16:37:37 +01:00
commit e860f7cfc7
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ class m(openerp.osv.osv.Model):
raise openerp.exceptions.Warning('description')
def generate_redirect_warning(self, cr, uid, ids, context=None):
raise openerp.exceptions.RedirectWarning('description', self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'menu_action_res_users'), 'go to the redirection')
dummy, action_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'test_exceptions', 'action_test_exceptions')
raise openerp.exceptions.RedirectWarning('description', action_id, 'go to the redirection')
def generate_access_denied(self, cr, uid, ids, context=None):
raise openerp.exceptions.AccessDenied()