Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged

Currently develop external ecommerce website for a customer, Is it possible to call "product.category" in other language in Odoo16. Since now there is only english and I already add more language on translation page.
What I do before with Product name is that adding "context": {"lang": "ko_KR"} to the code.

Avatar
Zrušit
Nejlepší odpověď

To display the "product.category" field in Korean (ko_KR), you can modify your code as follows:

category_name = product.category.display_name
translated_category_name = product.category.with_context(lang='ko_KR').display_name

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
dub 23
2629
Odoo 16 Vyřešeno
1
pro 22
4637
8
říj 25
7503
3
bře 24
3539
1
úno 24
3473