Skip to Content
Menu
This question has been flagged
5161 Rodiniai

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!

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
birž. 23
2140
1
rugp. 22
3013
0
geg. 22
2690
1
bal. 21
5291
0
vas. 25
961