Hi
How can i get Currently active company ids in Odoo 13 (case of multi company we can select multiple companies from the company list, right).
So how can i get these selected company ids in a function.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi
How can i get Currently active company ids in Odoo 13 (case of multi company we can select multiple companies from the company list, right).
So how can i get these selected company ids in a function.
Hi
You can get selected compay_id form the context.
selected_companies = self.env['res.company'].browse(self._context.get('allowed_company_ids'))
def _get_my_default_company(self):
company_ids = self.env.user.company_id.id
you can then use the ids to retrieve any information from the res.company table
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký