콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2371 화면

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


아바타
취소
관련 게시물 답글 화면 활동
2
9월 25
2342
1
8월 25
1886
1
8월 25
826
0
7월 25
930
0
7월 25
1461