Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3 Vastaukset
7400 Näkymät

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 ?

Avatar
Hylkää
Paras vastaus

Technically you can access the current company language by using the script env.user.company_id.partner_id.lang

Avatar
Hylkää
Paras vastaus

A company is related to a partner. You can retrieve the language from that partner.

Avatar
Hylkää
Paras vastaus

This is what someone might be looking for:

from odoo.tools import get_lang

get_lang(self.env).code


Avatar
Hylkää