Skip to content
Snippets Groups Projects
Commit 2b79397f authored by Bhatt Chintal's avatar Bhatt Chintal
Browse files

Bugfix: check on ir_model now raise a more convenient exception

bzr revid: bch-f0438c0b2dbe25cdced2ede7b436d979e7fb96f2
parent 1ec550dc
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@
from osv import fields,osv
import ir
import netsvc
from osv.orm import except_orm
import time
import tools
......@@ -99,7 +100,7 @@ class ir_model_access(osv.osv):
if not r[0][0]:
if raise_exception:
raise osv.except_osv('Access denied !', 'You can not %s this resource !' % mode)
raise except_orm('AccessError', 'You can not %s this resource !' % mode)
else:
return False
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment