[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) <ltu@odoo.com>
This commit is contained in:
committed by
Barad Mahendra
parent
f43995eab8
commit
b2eed699f1
@@ -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')
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
<group name="timesheet" groups="base.group_no_one" style="width:50%">
|
||||
<h2>Timesheets</h2>
|
||||
<field name="timesheet_project_id" context="{'active_test': False}"/>
|
||||
<field name="timesheet_task_id" context="{'active_test': False}" attrs="{'required': [('timesheet_project_id', '!=', False)]}"/>
|
||||
<field name="timesheet_task_id" context="{'active_test': False, 'default_project_id': timesheet_project_id}" attrs="
|
||||
{'invisible': [('timesheet_project_id', '=', False)], 'required': [('timesheet_project_id', '!=', False)]}"/>
|
||||
<field name="timesheet_generate" invisible="1"/>
|
||||
</group>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user