Hi! 

I'm trying to connect from another system to Tryton through JSON-RPC; I 
have no problems to authentificated, bring context and perform "search" and 
"read" operations, but when I try to make "create" or "update" operations 
the Trytond server returns errors.

This is an example of JSON-RPC "create" petition from my client:

{"id":3,"method":"model.res.user.create","params":[1,"e98bf14b347c4bcdab8bf949d98854eb",{"name":"newUser","active":true,"email":"[email protected]"},{"language":"es_ES","locale":{"date":"%d\/%m\/%Y","thousands_sep":".","decimal_point":",","grouping":[3,3,0]},"language_direction":"ltr","company_work_time":{"Y":1920.0,"M":160.0,"d":8.0,"w":40.0},"company.rec_name":"My
 
Company","groups":[1,2,3],"employee":null,"timezone":"Europe\/Madrid","company":1}]}

And this is the returned error from Trytond:

json-rpc error: ["'str' object has no attribute 'copy'","Traceback (most 
recent call last):\n File \"\/trytond\/protocols\/jsonrpc.py\", line 123, 
in _marshaled_dispatch\n response['result'] = dispatch_method(method, 
params)\n File \"\/trytond\/protocols\/jsonrpc.py\", line 156, in 
_dispatch\n res = dispatch(*args)\n File 
\"\/trytond\/protocols\/dispatcher.py\", line 168, in dispatch\n result = 
rpc.result(meth(*args, **kwargs))\n File \"\/trytond\/res\/user.py\", line 
216, in create\n vlist = [cls._convert_vals(vals) for vals in vlist]\n File 
\"\/trytond\/res\/user.py\", line 200, in _convert_vals\n vals = 
vals.copy()\nAttributeError: 'str' object has no attribute 'copy'\n"] 

I reviewed many times the JSON-RPC request but I can not locate the error. 
Could someone tell me the way?

Thanks!



Responder a