Skip to Content
मेन्यू
This question has been flagged

Good morning,

Please how I want to capture Access Denied error , but it is not working.

How can I handle this exception AccessDenied

Thank you.

try:
if req.session.model('res.users').change_password(
old_password, new_password):
return {'new_password':new_password}
except PassError as e:
return {'error': (e.message), 'title': ('Change Password')}
except AccessDenied, e:
return {'error': (e.message), 'title': ('Access Denied')}
Avatar
Discard
Related Posts Replies Views Activity
2
मई 22
34754
0
मार्च 19
4644
0
जन॰ 19
5763
4
फ़र॰ 24
13041
3
मार्च 18
8182