Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
7449 Vistas

Hi, I try to connect mobile apps to openerp 7 / odoo 8 with JSON-RPC

When I read data, the fields returned are the values without apply context (language and time zone).

I use http://www.mydomain.com/web/dataset/search_read

Maybe I can use other url for this?

How to obtain values using the context?

The json to search is similar to this:



{

        "jsonrpc": "2.0",

        "method": "call",

        "params": {

                "session_id": "c2ca1485aaseddsfggfgafd333",

                "context": {

                            "lang": "es_ES",

                            "tz": "Europe/Madrid", 

                            "uid": 3

                },

                "model": "crm.claim",

                "limit": 2,

                "domain": "",

                "sort": "write_date desc"

            }

}


But the returned values are datetime gmt:


{

        "jsonrpc": "2.0",

        "id": null,

        "result": {

                "records": [

                    {

                        "date_closed": false,

                        "message_follower_ids": [],

                        "create_date": "2015-03-20 10:27:54",       <--- 

                        "employee_ids": [],

                        "contact_id": [

                            3506,

                    ........


On web client:

        Fecha de creación:      20/03/2015 11:27:54

 

Ideas  are welcome!

Thx

Avatar
Descartar
Mejor respuesta

最后一个 参数 以  dict 的方式 传递  {  'context': {}} 

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
sept 20
6223
6
jul 20
11305
1
mar 20
3371
5
ene 20
9261
0
mar 17
4287