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

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
Annuleer
Auteur

Thanks Laura. That works !

Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
aug. 25
418
2
jul. 25
2843
3
jul. 25
648
1
jun. 25
2116
1
aug. 25
1021