This commit is contained in:
Bakry 2025-12-31 09:46:57 +03:00
parent 5e34f0dd17
commit 2b973f411d
1 changed files with 3 additions and 1 deletions

View File

@ -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) '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: 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: for install in item.deduction_lines:
loan_date = datetime.strptime(str(install.write_date), "%Y-%m-%d %H:%M:%S").date().month 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: if loan_date >= last_date and install.paid == True: