İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1861 Görünümler

Hey all,

i'm trying to get the currently selected company in a multi-company environment.

I've tried using 

self.env.user.company_id

But this gives me the user's default company.

I've also tried using the _context to get allowed_company_ids but this gives me a list that I can't use


Any help?

Avatar
Vazgeç

Does not work can you share with model code for example?

En İyi Yanıt

Hi,

You can get the currently selected company in a multi-company environment by self.env.context.get('allowed_company_ids')

Hope it helps


Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Ağu 25
388
0
Tem 25
560
0
Tem 25
1187
1
May 25
1685
1
Nis 25
1741