I need to get the current company language to be used in some official reports which can’t be based on the current user language, can anyone help me ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
3
Odpowiedzi
7351
Widoki
Technically you can access the current company language by using the script env.user.company_id.partner_id.lang
A company is related to a partner. You can retrieve the language from that partner.
This is what someone might be looking for:
from odoo.tools import get_lang
get_lang(self.env).code
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się