Skip to Content
मेन्यू
This question has been flagged
5139 Views

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
Discard
Related Posts Replies Views Activity
1
जून 23
2120
1
अग॰ 22
2984
0
मई 22
2665
1
अप्रैल 21
5270
0
फ़र॰ 25
936