Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1928 Vizualizări

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?

Imagine profil
Abandonează

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

Cel mai bun răspuns

Hi,

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

Hope it helps


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
aug. 25
1555
1
aug. 25
518
0
iul. 25
672
0
iul. 25
1239
1
mai 25
1758