Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
1952 Представления

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 Ответы Просмотры Активность
1
авг. 25
1565
1
авг. 25
541
0
июл. 25
690
0
июл. 25
1259
1
мая 25
1774