Merge lp:~unifield-team/unifield-web/us-1497 into lp:unifield-web

Proposed by Quentin THEURET @Amaris
Status: Merged
Merged at revision: 4795
Proposed branch: lp:~unifield-team/unifield-web/us-1497
Merge into: lp:unifield-web
Diff against target: 35 lines (+7/-0)
2 files modified
addons/openerp/controllers/utils.py (+3/-0)
addons/openerp/utils/rpc.py (+4/-0)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/us-1497
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+300328@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/controllers/utils.py'
2--- addons/openerp/controllers/utils.py 2015-07-13 13:49:40 +0000
3+++ addons/openerp/controllers/utils.py 2016-07-18 14:07:16 +0000
4@@ -150,6 +150,9 @@
5 nb_mod = rpc.session.number_update_modules(db) or ''
6 return login(cherrypy.request.path_info, message=_('The server is updating %s modules, please wait ...') % (nb_mod,),
7 db=db, user=user, action=action, origArgs=get_orig_args(kw))
8+ if action == 'login' and login_ret == -4:
9+ return login(cherrypy.request.path_info, message=_('A script during patch failed! Login is forbidden for the moment. Please contact your administrator'),
10+ db=db, user=user, action=action, origArgs=get_orig_args(kw))
11 elif login_ret <= 0:
12 # Bad login attempt
13 if action == 'login':
14
15=== modified file 'addons/openerp/utils/rpc.py'
16--- addons/openerp/utils/rpc.py 2016-03-04 15:34:25 +0000
17+++ addons/openerp/utils/rpc.py 2016-07-18 14:07:16 +0000
18@@ -134,6 +134,8 @@
19 common.error('updater.py', err.code)
20 elif err.code.startswith('ServerUpdate'):
21 common.error('ServerUpdate', err.code)
22+ elif err.code.startswith('PatchFailed'):
23+ common.error('PatchFailed', err.code)
24 elif err.code.startswith('AccessDenied'):
25 raise openobject.errors.AccessDenied(err.code, _('Access Denied'))
26 else:
27@@ -308,6 +310,8 @@
28 return -2
29 elif e.title == 'ServerUpdate':
30 return -3
31+ elif e.title == 'PatchFailed':
32+ return -4
33 return -1
34
35 if uid <= 0:

Subscribers

People subscribed via source and target branches

to all changes: