跳至内容
菜单
此问题已终结
2687 查看

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')}
形象
丢弃
相关帖文 回复 查看 活动
2
5月 22
34145
0
3月 19
4182
0
1月 19
5246
4
2月 24
12491
3
3月 18
7916