Before this commit, a company access rule existed for hr_leave but it
checked the company of the associated leave type, instead of the
company associated with the specific employee (or company in case of a
company leave) the leave applied to. This is especially problematic as
leave type are often reused across companies.
This was partially worked around by forcing the company domain using
employee_company_id on the specific actions that showed overviews of
leaves.
With this commit, this is rectified.
task-3383478
Part-of: odoo/odoo#119317