Merge pull request #2924 from expsa/fixing-error-attendance-report
fixing prod error
This commit is contained in:
commit
d0b3a585d3
|
|
@ -127,8 +127,7 @@ class HrAttendanceReport(models.Model):
|
|||
no_of_days = len(set(flexible_trans.mapped('date')))
|
||||
flexible_days = emp_calendar.number_of_flexi_days
|
||||
if no_of_days >= flexible_days:
|
||||
ord_trans_dates = sorted(set(flexible_trans.mapped('date')),
|
||||
key=lambda x: datetime.strptime(x, DATE_FORMAT))
|
||||
ord_trans_dates = sorted(set(flexible_trans.mapped('date')))
|
||||
index = len(ord_trans_dates) > flexible_days and flexible_days - 1 or len(ord_trans_dates) - 1
|
||||
df = fields.Date.from_string(self.date_from)
|
||||
while no_of_days >= flexible_days:
|
||||
|
|
|
|||
Loading…
Reference in New Issue