Use jsonrpc object_hook to load json from URL
(transplanted from ead6182dfa926891e9a429363c23466de561b5f0)
This commit is contained in:
1 parent
c7ccb4e8a2
commit
cadb1f877c
1 file changed
+14
-7
+14
-7
@@ -19,6 +19,7 @@ from tryton.common import RPCExecute, RPCException
|
||||
from tryton.config import CONFIG, TRYTON_ICON, get_config_dir
|
||||
import tryton.common as common
|
||||
from tryton.pyson import PYSONDecoder
|
||||
from tryton.jsonrpc import object_hook
|
||||
from tryton.action import Action
|
||||
from tryton.exceptions import TrytonServerError, TrytonError, \
|
||||
TrytonServerUnavailable
|
||||
@@ -1574,9 +1575,12 @@ class Main(object):
|
||||
limit = json.loads(params.get('limit', 'null'))
|
||||
auto_refresh = json.loads(params.get('auto_refresh', 'false'))
|
||||
name = json.loads(params.get('window_name', 'false'))
|
||||
search_value = json.loads(params.get('search_value', '{}'))
|
||||
domain = json.loads(params.get('domain', '[]'))
|
||||
context = json.loads(params.get('context', '{}'))
|
||||
search_value = json.loads(params.get('search_value', '{}'),
|
||||
object_hook=object_hook)
|
||||
domain = json.loads(params.get('domain', '[]'),
|
||||
object_hook=object_hook)
|
||||
context = json.loads(params.get('context', '{}'),
|
||||
object_hook=object_hook)
|
||||
except ValueError:
|
||||
return
|
||||
if path:
|
||||
@@ -1597,13 +1601,15 @@ class Main(object):
|
||||
if not wizard:
|
||||
return
|
||||
try:
|
||||
data = json.loads(params.get('data', '{}'))
|
||||
data = json.loads(params.get('data', '{}'),
|
||||
object_hook=object_hook)
|
||||
direct_print = json.loads(params.get('direct_print', 'false'))
|
||||
email_print = json.loads(params.get('email_print', 'false'))
|
||||
email = json.loads(params.get('email', 'null'))
|
||||
name = json.loads(params.get('name', 'false'))
|
||||
window = json.loads(params.get('window', 'false'))
|
||||
context = json.loads(params.get('context', '{}'))
|
||||
context = json.loads(params.get('context', '{}'),
|
||||
object_hook=object_hook)
|
||||
except ValueError:
|
||||
return
|
||||
try:
|
||||
@@ -1618,11 +1624,12 @@ class Main(object):
|
||||
if not report:
|
||||
return
|
||||
try:
|
||||
data = json.loads(params.get('data'))
|
||||
data = json.loads(params.get('data'), object_hook=object_hook)
|
||||
direct_print = json.loads(params.get('direct_print', 'false'))
|
||||
email_print = json.loads(params.get('email_print', 'false'))
|
||||
email = json.loads(params.get('email', 'null'))
|
||||
context = json.loads(params.get('context', '{}'))
|
||||
context = json.loads(params.get('context', '{}'),
|
||||
object_hook=object_hook)
|
||||
except ValueError:
|
||||
return
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user