diff --git a/odex25_hr/exp_payroll_loans/models/reconcile_leaves.py b/odex25_hr/exp_payroll_loans/models/reconcile_leaves.py index 063d01b53..1b15e4f06 100644 --- a/odex25_hr/exp_payroll_loans/models/reconcile_leaves.py +++ b/odex25_hr/exp_payroll_loans/models/reconcile_leaves.py @@ -263,7 +263,9 @@ class ReconcileLeaves(models.Model): 'You can not re-draft reconcile leaves because account move with ID "%s" in state Posted') % self.account_move_id.name) for item in self.loans_ids: - last_date = datetime.strptime(str(self.write_date), "%Y-%m-%d %H:%M:%S").date().month + #last_date = datetime.strptime(str(self.write_date), "%Y-%m-%d %H:%M:%S").date().month + last_date = fields.Datetime.from_string(self.write_date).month + for install in item.deduction_lines: loan_date = datetime.strptime(str(install.write_date), "%Y-%m-%d %H:%M:%S").date().month if loan_date >= last_date and install.paid == True: