From b2eed699f1a1a509ad67147cb87deaba5a6c3d11 Mon Sep 17 00:00:00 2001 From: "Rohitkumar (roku)" Date: Mon, 31 Jan 2022 11:14:10 +0000 Subject: [PATCH] [FIX] project_timesheet_holidays: don't show private task in timesheet task Before this commit, in time off form view, task field contains the private task. So this commit fixes the issue by not displaying the private task in task field of time off form view. task-2733415 closes odoo/odoo#89674 X-original-commit: 76fcd0cfe5fc157f22825544e239f283831b49fd Related: odoo/enterprise#26611 Signed-off-by: Laurent Stukkens (ltu) --- addons/project_timesheet_holidays/models/hr_holidays.py | 1 + addons/project_timesheet_holidays/views/hr_holidays_views.xml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/project_timesheet_holidays/models/hr_holidays.py b/addons/project_timesheet_holidays/models/hr_holidays.py index 9dba2470ee1..aded3a41c83 100644 --- a/addons/project_timesheet_holidays/models/hr_holidays.py +++ b/addons/project_timesheet_holidays/models/hr_holidays.py @@ -24,6 +24,7 @@ class HolidaysType(models.Model): 'project.task', string="Task", compute='_compute_timesheet_task_id', store=True, readonly=False, default=_default_task_id, domain="[('project_id', '=', timesheet_project_id)," + "('project_id', '!=', False)," "('company_id', '=', company_id)]") @api.depends('timesheet_task_id', 'timesheet_project_id') diff --git a/addons/project_timesheet_holidays/views/hr_holidays_views.xml b/addons/project_timesheet_holidays/views/hr_holidays_views.xml index 2c25ad5c8b7..d98866faefa 100644 --- a/addons/project_timesheet_holidays/views/hr_holidays_views.xml +++ b/addons/project_timesheet_holidays/views/hr_holidays_views.xml @@ -10,7 +10,8 @@

Timesheets

- +