Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
5167 Vizualizări

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!

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iun. 23
2144
1
aug. 22
3020
0
mai 22
2701
1
apr. 21
5301
0
feb. 25
981