Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1393 Weergaven

We are running an Odoo 18.0+e-20241114 (Enterprise-Edition)​ and are using the JSON RPC especially in order to integrate with n8n and Zapier. I have written a JSON RPC that fetches all projects and child stages so we have an extended overview

```

{

  "jsonrpc":"2.0",

  "method":"call",

  "params":{

    "service":"object",

    "method":"execute_kw",

    "args":[

      "{{ $vars.Odoo_database }}",

      {{ $vars. Odoo_API_userID }},

      "{{ $vars.Odoo_API_key }}",

      "project.task.type",

      "search_read",

      [],

      {

        "fields":[

          "id",

          "name",

          "project_ids"

        ]

      }

    ]

  },

  "id": {{ $now.toMillis() }}

}

```

This call fetches results, but they don't reflect the actual current values. E.g. when I rename a stage, this RPC delivers the old names of project and stages.

What could be the issue here? Is there some fixed name that stays and another display name that can be modified? Or is there some caching in place that I need to customize accordingly?

Any help appreciated! Thanks in advance and kind regards
Moritz

Avatar
Annuleer

Are you sure that your database doesn't have multiple languages and thus you only translated it in another language then what is given back by the XML-RPC script? :-)

Auteur

@Yenthe you are a genius, thanks a lot. Adding the language as context attribute did the job.

```
{
"jsonrpc": "2.0",
"method": "call",
"params": {
"service": "object",
"method": "execute_kw",
"args": [
"{{ $vars.Odoo_database }}",
{{ $vars.Odoo_API_userID }},
"{{ $vars.Odoo_API_key }}",
"project.task.type",
"search_read",
[],
{
"fields": ["id", "name", "project_ids"],
"context": {
"lang": "de_DE"
}
}
]
},
"id": {{ $now.toMillis() }}
}
```

I cannot transform your comment into (the correct) answer since I am still missing required amount of karma points. When you post this as an answer, I can mark it as correct.

Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 25
1123
2
apr. 25
1893
1
feb. 25
1433
0
jan. 25
1053
1
dec. 24
1754