'Compute difference between current date and log date'

@api.depends('date_closed')
def _compute_day_close(self):

    for lead in self.filtered((lambda l: l.date_closed)):
        date_create = fields.Datetime.from_string(lead.create_date)
        date_close = fields.Datetime.from_string(lead.date_closed)
        lead.day_close = abs((date_close - date_create).days)
