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

Image Privew

i want to get current company id not user default company id ..

Need current Company ID which is selected at the top 

Avatar
Vazgeç
En İyi Yanıt

Hi,

You can get current company from self.env.user.company_id. Company id will change according to the selection in the company switcher.

Thank you


Avatar
Vazgeç
En İyi Yanıt

HI,

You can get current user id using 

user_id = self.env.user

and you want to user company than use 

company_id = user_id.company_id

I think work for you

THANKS 

Avatar
Vazgeç
Üretici

can i get currency_id like this ?

currency_id = user_id.currency_id

Yes, you can get using dot notation as well as the search method.

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Tem 25
1908
3
Tem 25
2324
1
Tem 25
1587
3
Kas 24
361
4
Eyl 24
3161