Skip to Content
मेन्यू
This question has been flagged
2 Replies
12118 Views

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
Discard
Best Answer

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
Discard
Best Answer

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
Discard
Author

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.

Related Posts Replies Views Activity
2
जुल॰ 25
1898
3
जुल॰ 25
2314
1
जुल॰ 25
1576
3
नव॰ 24
361
4
सित॰ 24
3157