diff options
| author | ced <> | 2008-01-29 15:05:48 +0000 |
|---|---|---|
| committer | ced <> | 2008-01-29 15:05:48 +0000 |
| commit | 73e09cbc814c381b8df9af7eccc4e4c8db5b73b5 (patch) | |
| tree | 2f6be063afd6b53f761469be963a2ccc392607b0 /bin | |
| parent | 699de6a7b8e3d4fe1d8c3988ad17aa83224e2036 (diff) | |
Improve error message
bzr revid: ced-9f7dfef3f8838e3eea4fe2931aaded3dec62cec4
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/addons/base/ir/ir_model.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py index f84a868f269..8ef7ea765bd 100644 --- a/bin/addons/base/ir/ir_model.py +++ b/bin/addons/base/ir/ir_model.py @@ -113,14 +113,19 @@ class ir_model_access(osv.osv): if not r[0][0]: if raise_exception: if mode == 'read': - raise except_orm('AccessError', 'You can not read this document!') + raise except_orm('AccessError', + 'You can not read this document! (%s)' % model_name) elif mode == 'write': - raise except_orm('AccessError', 'You can not write in this document!') + raise except_orm('AccessError', + 'You can not write in this document! (%s)' % model_name) elif mode == 'create': - raise except_orm('AccessError', 'You can not create this kind of document!') + raise except_orm('AccessError', + 'You can not create this kind of document! (%s)' % model_name) elif mode == 'unlink': - raise except_orm('AccessError', 'You can not delete this document!') - raise except_orm('AccessError', 'You do not have access to this document!') + raise except_orm('AccessError', + 'You can not delete this document! (%s)' % model_name) + raise except_orm('AccessError', + 'You do not have access to this document! (%s)' % model_name) else: return False return True |
