Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
12110 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Jawaban Terbai

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
Buang
Penulis

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.

Post Terkait Replies Tampilan Aktivitas
2
Jul 25
1805
3
Jul 25
2219
1
Jul 25
1515
3
Nov 24
361
4
Sep 24
3114