Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2082 Zobrazení

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
Zrušit

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

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
zář 25
2066
1
srp 25
1678
1
srp 25
657
0
čvc 25
792
0
čvc 25
1323