Skip to content

Commit d8fdfd5

Browse files
committed
[FIX] hr_contract_employee_calendar_planning: Avoid making changes to contracts based on the appropriate calendar
If the contracts use the same (auto-generated) calendar as the employee, do not make any changes to those contracts when installing the module TT63452
1 parent 1135626 commit d8fdfd5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • hr_contract_employee_calendar_planning

hr_contract_employee_calendar_planning/hooks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ def post_init_hook(env):
1212
for employee in employees.filtered("contract_ids"):
1313
contract_calendar_lines = []
1414
for contract in employee.contract_ids.sorted("date_start"):
15+
if contract.resource_calendar_id == employee.resource_calendar_id:
16+
continue
1517
date_start = contract.date_start
1618
date_end = contract.date_end
1719
# filter calendar_ids to check for overlaps with contracts

0 commit comments

Comments
 (0)