Hi community,
I am looking at ways to determine the current company for a user in order to show only records for the current company for multi-company environments. I am wondering what is the purpose of this method:
self.env['res.company']._company_default_get()
Why do we need to go trough a method in res.company which calls a method in res.user.
Can't we directly call the method in res.user
self.env['res.users']._get_company()
Or even better can't we directly use:
self.env.user.company_id
What is the difference between the 3, which one is better to be used?