Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Jun 30, 2022

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 17b2b07 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.

A task exist to fix the issue on master id 2884736

opw-2887727
opw-2870739

Forward-Port-Of: #94308

… 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 17b2b07 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.

opw-2887727
opw-2870739

X-original-commit: d5ac8e0
@robodoo
Copy link
Contributor

robodoo commented Jun 30, 2022

@fw-bot
Copy link
Contributor Author

fw-bot commented Jun 30, 2022

This PR targets saas-15.1 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Jun 30, 2022
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Jun 30, 2022
@mafo-odoo
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request Jul 4, 2022
… 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 17b2b07 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.

opw-2887727
opw-2870739

closes #95011

X-original-commit: d5ac8e0
Related: odoo/enterprise#28998
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
@robodoo robodoo closed this Jul 4, 2022
@robodoo robodoo temporarily deployed to merge July 4, 2022 10:35 Inactive
@fw-bot fw-bot deleted the saas-15.1-15.0-opw-2870739-archived-employee-in-timesheet-mafo--U1x-fw branch July 18, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants