Skip to content
Snippets Groups Projects
Commit dd9dd0a8 authored by mafo-odoo's avatar mafo-odoo Committed by Nasreddin Boulif (bon)
Browse files

[FIX] hr_timesheet: avoid setting an archived employee to a timesheet in the form view


Steps to reproduce:
- Install timesheet
- Archive an employee
- Create a timesheet

Current behavior:
You can select the archived employee

Expected behavior:
You can not select the archived employee

Explanation:
In commit 17b2b07e76121ebb0be16637bf4082e457c2ac63 the employee_id
field of the timesheet was set to have context active_test to false.
To fix this issue we reset the context for this field in every
timesheet form and we add user errors if the employee is not active
while the timesheet is created or edited.

backport of odoo/odoo#94308

opw-2887727
opw-2870739

closes odoo/odoo#97760

Related: odoo/enterprise#30271
Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
parent d01c2010
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment