跳至內容
選單
此問題已被標幟
5165 瀏覽次數

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!

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
6月 23
2143
1
8月 22
3020
0
5月 22
2700
1
4月 21
5299
0
2月 25
978