コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1700 ビュー

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

アバター
破棄
著作者

Thanks Laura. That works !

最善の回答

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"

​}

​} )

アバター
破棄
関連投稿 返信 ビュー 活動
0
8月 25
72
1
8月 25
492
2
7月 25
2940
3
7月 25
694
1
6月 25
2177