[FIX] hr_holidays: fix My Time Off access in multicompany

Before this commit, trying to access "My Time Off" was
not possible if connected on a company while some leaves
were created from another company.
This commit restricts that view to the leave created from
the companies the user is logged into.

closes odoo/odoo#122186

X-original-commit: c0039aa40a1274110906e45ba07a318fc6218267
Signed-off-by: Gvaladze Sopiko (sgv) <sgv@odoo.com>
This commit is contained in:
Dossogne Bertrand
2023-05-24 09:49:07 +02:00
parent 31a62e3d16
commit 17c6aa21d9
+1 -1
View File
@@ -644,7 +644,7 @@
<field name="search_view_id" ref="hr_leave_view_search_my"/>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'kanban', 'view_id': ref('hr_leave_view_kanban')})]"/>
<field name="domain">[('user_id', '=', uid)]</field>
<field name="domain">[('user_id', '=', uid), ('employee_company_id', 'in', allowed_company_ids)]</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Keep track of your PTOs.