Skip to Content
Menú
This question has been flagged
5146 Vistes

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
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 23
2123
1
d’ag. 22
2988
0
de maig 22
2671
1
d’abr. 21
5277
0
de febr. 25
938