Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
1543 Ansichten

I'm using Odoo 15! When I try "self.env.company" I get the same result as when I try "self.env.user.company_id". In other words, regardless of what company I choose in my Odoo environment, it picks the default company of my current user.



What could be the possible issue?

Avatar
Verwerfen
Beste Antwort

Hi, 

You can see following for this:

https://youtu.be/GkNgc-fZO-I

Hope it helps,

Thanks

Avatar
Verwerfen
Beste Antwort

Hi,

If you need to get the selected company in the company switcher, you can use the self.env.company .

Can you see if this works fine, assign default company for user as C1 and provide access to multiple companies: C1, C2,...

Now in the environment select the company as C2 and if you evaluate self.env.company id you will get/expected to be C2


Thanks

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Juli 25
2016
3
Juli 25
2436
1
Juli 25
1686
3
Nov. 24
361
4
Sept. 24
3218