Fix hr_payroll_gamification Resolve datetime error on payslip.

This commit is contained in:
Bhoomi
2019-10-17 12:59:42 -04:00
committed by Jared Kipe
parent c16baa0ac4
commit 6c9646f5d6
2 changed files with 7 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ class Payslip(models.Model):
amount += bu.badge_id.payroll_amount
for bu in contract.employee_id.badge_ids.filtered(lambda bu: (
bu.badge_id.payroll_type == 'period'
and date_from <= str(bu.create_date) <= date_to
and date_from <= bu.create_date.date() <= date_to
)):
amount += bu.badge_id.payroll_amount
return amount