تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
7358 أدوات العرض

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 ?

الصورة الرمزية
إهمال
أفضل إجابة

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


الصورة الرمزية
إهمال