Skip to Content
Menu
This question has been flagged
1 Reply
3356 Views

Hello,

I am querying Odoo with API from PHP with phpxmlrpc. I can now search and read data from Odoo. But every text fields are in English and not in French (French is installed and work).

How could I tell the API to retrieve French translated text instead of English ?

Thank you for your response...

Jeff.

Avatar
Discard
Best Answer

Hi,

The blow code returns the translated values for execute method, for execute_kw the logic is also same i guess.

 res = models.execute(db, uid, password,
    'product.template', 'search_read',
    [[['name', 'ilike', 'acoustic']]],
    {'limit': 5, 'context' :{'lang': "en_US"}})
Avatar
Discard