Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2334 Переглядів

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?

Аватар
Відмінити

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

Найкраща відповідь

Hi,

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

Hope it helps


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
вер. 25
2318
1
серп. 25
1867
1
серп. 25
812
0
лип. 25
926
0
лип. 25
1455