Merge lp:~openerp-dev/openerp-web/7.0-opw-605743-msh into lp:openerp-web/7.0

Proposed by Mohammed Shekha(Open ERP) on 2014-03-27
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-605743-msh
Merge into: lp:openerp-web/7.0
Diff against target: 34 lines (+6/-5)
1 file modified
addons/web/session.py (+6/-5)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-605743-msh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) 2014-03-27 Pending
Martin Trigaux (OpenERP) 2014-03-27 Pending
Review via email: mp+213025@code.launchpad.net

Description of the change

Hello,

Please go through description of server branch for details.
Branch: lp:~openerp-dev/openobject-server/7.0-opw-605743-msh

Thanks.

To post a comment you must log in.

Unmerged revisions

4166. By Mohammed Shekha(Open ERP) on 2014-03-27

[FIX]Web: Fixed the issue of translation of xmlrpclib.Fault code, warning is not translated, also fixed the same thing in server.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/session.py'
2--- addons/web/session.py 2013-05-14 10:37:36 +0000
3+++ addons/web/session.py 2014-03-27 11:29:06 +0000
4@@ -6,6 +6,7 @@
5 import traceback
6 import sys
7 import xmlrpclib
8+from openerp.tools.translate import _
9
10 import openerp
11
12@@ -84,17 +85,17 @@
13 self.jsonp_requests = {} # FIXME use a LRU
14
15 def send(self, service_name, method, *args):
16- code_string = u"warning -- %s\n\n%s"
17+ code_string = u"%s -- %s\n\n%s"
18 try:
19 return openerp.netsvc.dispatch_rpc(service_name, method, args)
20 except openerp.osv.osv.except_osv, e:
21- raise xmlrpclib.Fault(code_string % (e.name, e.value), '')
22+ raise xmlrpclib.Fault(code_string % (_("warning"), e.name, e.value), '')
23 except openerp.exceptions.Warning, e:
24- raise xmlrpclib.Fault(code_string % ("Warning", e), '')
25+ raise xmlrpclib.Fault(code_string % (_("warning"), _("Warning"), e), '')
26 except openerp.exceptions.AccessError, e:
27- raise xmlrpclib.Fault(code_string % ("AccessError", e), '')
28+ raise xmlrpclib.Fault(code_string % (_("warning"), _("AccessError"), e), '')
29 except openerp.exceptions.AccessDenied, e:
30- raise xmlrpclib.Fault('AccessDenied', openerp.tools.ustr(e))
31+ raise xmlrpclib.Fault(_('AccessDenied'), openerp.tools.ustr(e))
32 except openerp.exceptions.DeferredException, e:
33 formatted_info = "".join(traceback.format_exception(*e.traceback))
34 raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)