diff options
| author | Lucas Lefèvre <lul@odoo.com> | 2019-04-18 13:22:58 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-04-24 12:26:27 +0000 |
| commit | 08da07b1cab808ab749770e8392fefb79f5b567a (patch) | |
| tree | a897f1645caca9950259c984c5490cacd6f642aa /addons/base_setup/data/base_setup_data.xml | |
| parent | d6242a340d5cadd0440215183f9826cf533f5164 (diff) | |
[FIX] hr_holidays: Fix deleted default employee
The goal of commit 2dbce5e 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.
Diffstat (limited to 'addons/base_setup/data/base_setup_data.xml')
0 files changed, 0 insertions, 0 deletions
