From 753a5d5d99407b84b30b5ba48d549cea0b9d2f75 Mon Sep 17 00:00:00 2001 From: Dossogne Bertrand Date: Wed, 27 Sep 2023 17:13:17 +0200 Subject: [PATCH] [IMP] hr: remove schedule on public employee This commit removes the resource_calendar_id field on the public employee, as this is giving information that we don't necessarily want to be public. Additionnaly, it led to the possibility for every user to access calendar forms. task-3519805 closes odoo/odoo#137211 Signed-off-by: Yannick Tivisse (yti) --- addons/hr/models/hr_employee.py | 2 +- addons/hr/models/hr_employee_public.py | 1 - addons/hr/views/hr_employee_public_views.xml | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/hr/models/hr_employee.py b/addons/hr/models/hr_employee.py index 78e280e4054..6d52d007f5e 100644 --- a/addons/hr/models/hr_employee.py +++ b/addons/hr/models/hr_employee.py @@ -13,7 +13,7 @@ from markupsafe import Markup from odoo import api, fields, models, _ from odoo.exceptions import ValidationError, AccessError from odoo.osv import expression -from odoo.tools import format_date, Query +from odoo.tools import format_date class HrEmployeePrivate(models.Model): diff --git a/addons/hr/models/hr_employee_public.py b/addons/hr/models/hr_employee_public.py index 3e434733cd1..e7a18f1c985 100644 --- a/addons/hr/models/hr_employee_public.py +++ b/addons/hr/models/hr_employee_public.py @@ -28,7 +28,6 @@ class HrEmployeePublic(models.Model): work_location_id = fields.Many2one(readonly=True) user_id = fields.Many2one(readonly=True) resource_id = fields.Many2one(readonly=True) - resource_calendar_id = fields.Many2one(readonly=True) tz = fields.Selection(readonly=True) color = fields.Integer(readonly=True) diff --git a/addons/hr/views/hr_employee_public_views.xml b/addons/hr/views/hr_employee_public_views.xml index 90d3d5bc799..53d8d16bb38 100644 --- a/addons/hr/views/hr_employee_public_views.xml +++ b/addons/hr/views/hr_employee_public_views.xml @@ -90,9 +90,6 @@ - - -