Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
769 Visualizzazioni

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

Avatar
Abbandona
Autore

Thanks Laura. That works !

Risposta migliore

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"

​}

​} )

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 25
835
0
set 24
4
0
set 24
1177
1
giu 24
1633
1
mar 24
2021