-
- Downloads
[FIX] hr_holidays: Fix deleted default employee
The goal of commit 2dbce5e6 was to handle the company holiday type in onchange which was probably forgotten when the company type was introduced. However because the last `elif` was changed to `else`, the `else` clause is executed in some situations where it shouldn't. e.g. If holiday type is `employee` and an employee is set, the `else` clause is (obviously wrongly) executed. This is particularly a problem if the employee is not HR user nor manager. In that case, the field employee_id is invisible and its value has been deleted by the onchange. The allocation cannot be saved because it violates the sql constraint (employee is null). Also, the `mode_company_id` and `category_id` should be set to `False` when the holiday type is not company/category.
Please register or sign in to comment