Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
1933 Weergaven

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
Annuleer

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

Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
aug. 25
1559
1
aug. 25
523
0
jul. 25
676
0
jul. 25
1243
1
mei 25
1760