updata late_transaction_report_wiz

This commit is contained in:
Mazen Abdo 2024-12-02 11:34:21 +02:00
parent 33e4bc19eb
commit c0bff915a1
1 changed files with 2 additions and 2 deletions

View File

@ -119,8 +119,8 @@ class ReportIncomingTransaction(models.AbstractModel):
if internal_ids:
today = fields.date.today()
for rec in internal_ids:
if datetime.datetime.strptime(rec.due_date, "%Y-%m-%d") < datetime.datetime.strptime(str(today),
"%Y-%m-%d"):
if rec.due_date and datetime.datetime.strptime(rec.due_date.strftime("%Y-%m-%d"),
"%Y-%m-%d") < datetime.datetime.strptime(today.strftime("%Y-%m-%d"), "%Y-%m-%d"):
trasc = rec.trace_ids.filtered(lambda z: z.action == 'forward' or z.action == 'sent' or
z.action == 'reply')[0]
name = ''