Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
5150 Переглядів

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!

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
черв. 23
2127
1
серп. 22
2990
0
трав. 22
2672
Controller inheritance Вирішено
1
квіт. 21
5278
0
лют. 25
939