diff --git a/addons/hr_timesheet/models/hr_timesheet.py b/addons/hr_timesheet/models/hr_timesheet.py index 151959944c5..4fa6786a729 100644 --- a/addons/hr_timesheet/models/hr_timesheet.py +++ b/addons/hr_timesheet/models/hr_timesheet.py @@ -23,7 +23,7 @@ class AccountAnalyticLine(models.Model): task_id = fields.Many2one('project.task', 'Task', index=True, domain="[('company_id', '=', company_id)]") project_id = fields.Many2one('project.project', 'Project', domain=[('allow_timesheets', '=', True)]) - employee_id = fields.Many2one('hr.employee', "Employee") + employee_id = fields.Many2one('hr.employee', "Employee", check_company=True) department_id = fields.Many2one('hr.department', "Department", compute='_compute_department_id', store=True, compute_sudo=True) encoding_uom_id = fields.Many2one('uom.uom', compute='_compute_encoding_uom_id') diff --git a/addons/hr_timesheet/views/hr_timesheet_views.xml b/addons/hr_timesheet/views/hr_timesheet_views.xml index 6f5b16b7181..e1be7846aad 100644 --- a/addons/hr_timesheet/views/hr_timesheet_views.xml +++ b/addons/hr_timesheet/views/hr_timesheet_views.xml @@ -27,6 +27,7 @@ + @@ -41,6 +42,7 @@ + diff --git a/addons/hr_timesheet/views/project_views.xml b/addons/hr_timesheet/views/project_views.xml index cbafa431f03..de2c9365aff 100644 --- a/addons/hr_timesheet/views/project_views.xml +++ b/addons/hr_timesheet/views/project_views.xml @@ -94,6 +94,7 @@ + @@ -136,6 +137,7 @@ +