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

I have setup 3 companies,

And for user = Admin, all 3 companies are 'allowed', the default company is company 1.

I tried several scripts inside the Controller but none of them could return the correct value of the current company displayed on the upper right side of the windows.

user = request.env['res.users'].sudo.browse(request.uid)

current_company = user.company_id.name

but it always points to the user's default company (in this case id=1) even if i change the company on the top-right corner.

Please help. Thank you Odooers!

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvn 23
2367
1
srp 22
3234
0
kvě 22
2981
1
dub 21
5737
0
úno 25
1244