[IMP] hr_payroll_overtime: implement exempt from overtime on contract

This commit is contained in:
Jared Kipe
2020-12-10 09:40:06 -08:00
parent 60fe0cc4a2
commit 75d6c97e69
6 changed files with 56 additions and 1 deletions

View File

@@ -105,7 +105,7 @@ class HRPayslip(models.Model):
working_aggregation[work_type][2] = multiplier
week = iso_date[1]
if work_type.overtime_work_type_id and work_type.overtime_type_id:
if not self.contract_id.is_overtime_exempt and work_type.overtime_work_type_id and work_type.overtime_type_id:
ot_h_w = work_type.overtime_type_id.hours_per_week
ot_h_d = work_type.overtime_type_id.hours_per_day