İçereği Atla
Menü
Bu soru işaretlendi
5153 Görünümler

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Haz 23
2129
1
Ağu 22
2995
0
May 22
2678
1
Nis 21
5283
0
Şub 25
944