Skip to Content
Menú
This question has been flagged
1 Respondre
1738 Vistes

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
Descartar

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

Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
0
d’ag. 25
58
0
de jul. 25
434
0
de jul. 25
1067
1
de maig 25
1552
1
d’abr. 25
1560