Files
odoo_source/addons/hr_work_entry_contract
“Your 63e8624b01 [FIX] hr_work_entry_contract: don't recompute work entries without employee_id
Currently, the error occurs while updating a work contract without
selecting any  employee.

Steps to reproduce:
- Install a 'Work Entries - Contract' module.
- Go to Employees> Employees> Contracts, And create a new contract without
  selecting any employee and also the 'Contract Start Date ' and
  'Contract End Date' fields  should be after or before the current date.
- Then save it .
- Then change 'Working Schedule' field of the created contract and save it.
- The error is generated.

Error: DatatypeMismatch : column 'hr_employee_id' is of type integer but
expression is of type boolean
LINE 1: ...neration_wizard_id', 'hr_employee_id') VALUES (1, false) ON ...

There's an issue while updating the contract without selecting any employee; As
the system is trying to recompute work entries without employee_id [1].

This commit solves this issue by adding a condition which states that
recompute the work entries; if employee_id is available.

[1]-https://github.com/odoo/odoo/blob/1b504038ce270540ddab28db4ab995d22f2ab2a7/addons/hr_work_entry_contract/models/hr_contract.py#L448-L452

sentry-4654142515

closes odoo/odoo#144180

X-original-commit: 8fc11c9c9be7a654de49664da44d5ba68d23cbd3
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-11-30 14:48:20 +00:00
..
…