Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
12146 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Auteur

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.

Gerelateerde posts Antwoorden Weergaven Activiteit
2
jul. 25
1962
3
jul. 25
2381
1
jul. 25
1640
3
nov. 24
361
4
sep. 24
3183