Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1781 Vizualizări

Hi,


When I want to get project names via the API, I get the original names instead of the current ones.

Am I missing something in the query ?


projects = models.execute_kw(

    db, uid, password,

    'project.project',

    'search_read',

    [],

    {

        'fields': [

            'id', 'display_name', 'name'

        ]

    }

)


Thanks.


Ayman

Imagine profil
Abandonează
Autor

Thanks Laura. That works !

Cel mai bun răspuns

I found the answer to this problem here: https://www.odoo.com/fr_FR/forum/aide-1/why-does-the-json-rpc-return-outdated-data-solved-268870?msockid=01f063b446826ed027d7762a473f6f1d

In your case:

projects = models.execute_kw(

​db, uid, password,

​'project.project',

​'search_read',

​[],

​{

​'fields': [

​'id', 'display_name', 'name'

​],

​'context': {

​'lang': "en_US"

​}

​} )

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
aug. 25
542
1
aug. 25
734
2
iul. 25
3297
3
iul. 25
909
1
iun. 25
2439