Before this commit, when the user cancels his validated time off planned in the future, the timesheets generated for this time off are not deleted. The problem is since the timesheets are not removed we could have duplicated timesheets if the user adds a new time off in the same days for instance, because the newest timesheets are generated and thus we have duplicated timesheets generated instead of having only timesheets generated for the newest time off. This commit removes the timesheets generated for the time off when this time off is canceled (=archived). Also, It also prevent the user to manually unarchive the time off since this operation is not really managed and could introduced eventual problems. Related PR: #76722 Part of task-2791386 closes odoo/odoo#89246 X-original-commit: a9e63ebe32079e2215acafcd4bca15b371ee9bc2 Signed-off-by: Kevin Baptiste <kba@odoo.com> Signed-off-by: Xavier <xbo@odoo.com> Co-authored-by: William Braeckman <wbr@odoo.com>
18 lines
599 B
Python
18 lines
599 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import test_access_rights
|
|
from . import test_automatic_leave_dates
|
|
from . import test_allocation_access_rights
|
|
from . import test_holidays_flow
|
|
from . import test_hr_holidays_cancel_leave
|
|
from . import test_hr_leave_type
|
|
from . import test_accrual_allocations
|
|
from . import test_change_department
|
|
from . import test_leave_requests
|
|
from . import test_out_of_office
|
|
from . import test_company_leave
|
|
from . import test_res_partner
|
|
from . import test_stress_days
|
|
from . import test_global_leaves
|