Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
1658 Visualizações

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
Cancelar
Autor

Thanks Laura. That works !

Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
ago. 25
383
2
jul. 25
2829
3
jul. 25
636
1
jun. 25
2102
1
ago. 25
1012