Bugfix: check on ir_model now raise a more convenient exception

bzr revid: bch-f0438c0b2dbe25cdced2ede7b436d979e7fb96f2
This commit is contained in:
bch 2007-06-08 14:34:12 +00:00
parent 1ec550dc2c
commit 2b79397f0a
1 changed files with 2 additions and 1 deletions

View File

@ -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