From 2b973f411d81a7dcba99e58f85f0816b13f651b3 Mon Sep 17 00:00:00 2001 From: Bakry Date: Wed, 31 Dec 2025 09:46:57 +0300 Subject: [PATCH] fix --- odex25_hr/exp_payroll_loans/models/reconcile_leaves.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: