title: How to resolve error "TypeError: strptime() argument 1 must be str, not bool"
body: <p>i'm using odoo 11 and i have develop a custom module which allow to modify "hr.attendance" via a modification request which be approved by the manager after that "hr.attendance" will be updated automatically with the new values of check in and check out of the attendance modification.But when i press the approve button it shows this error </p>
  
  <p>Traceback </p>
  
  <pre><code>Traceback (most recent call last):
  File "/opt/openhrms/odoo/http.py", line 651, in _handle_exception
  return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/openhrms/odoo/http.py", line 310, in _handle_exception
  raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/openhrms/odoo/tools/pycompat.py", line 87, in reraise
  raise value
  File "/opt/openhrms/odoo/http.py", line 693, in dispatch
  result = self._call_function(**self.params)
  File "/opt/openhrms/odoo/http.py", line 342, in _call_function
  return checked_call(self.db, *args, **kwargs)
  File "/opt/openhrms/odoo/service/model.py", line 97, in wrapper
  return f(dbname, *args, **kwargs)
  File "/opt/openhrms/odoo/http.py", line 335, in checked_call
  result = self.endpoint(*a, **kw)
  File "/opt/openhrms/odoo/http.py", line 937, in __call__
  return self.method(*args, **kw)
  File "/opt/openhrms/odoo/http.py", line 515, in response_wrap
  response = f(*args, **kw)
  File "/opt/openhrms/addons/web/controllers/main.py", line 938, in call_button
  action = self._call_kw(model, method, args, {})
  File "/opt/openhrms/addons/web/controllers/main.py", line 926, in _call_kw
  return call_kw(request.env[model], method, args, kwargs)
  File "/opt/openhrms/odoo/api.py", line 689, in call_kw
  return call_kw_multi(method, model, args, kwargs)
  File "/opt/openhrms/odoo/api.py", line 680, in call_kw_multi
  result = method(recs, *args, **kwargs)
  File "/opt/openhrms/addons/sifast_attendance_modification_request/models/hr_attendance_modification_request.py", line 54, in modification_approval
  attendance_check_in_date = datetime.datetime.strptime(record.attendance_id.check_in,DEFAULT_SERVER_DATETIME_FORMAT).date()
  
  TypeError: strptime() argument 1 must be str, not bool
  </code></pre>
  
  <p>Here is my code: </p>
  
  <pre><code>class AttendanceModificationRequest(models.Model):
  
      _name = 'attendance.modification.request'
      _description = 'Attendance modification Request'
      _inherit = ['mail.thread', 'mail.activity.mixin']
  
      def _get_employee_id(self):
          employee_rec = self.env['hr.employee'].search([('user_id', '=',
                  self.env.uid)], limit=1)
          return employee_rec.id
  
      employee_id = fields.Many2one('hr.employee', 'Employee',
                                    readonly=True,
                                    default=_get_employee_id,
                                    required=True)
      user_id = fields.Many2one(
          'res.users',
          string='User',
          track_visibility='onchange',
          readonly=True,
          states={'draft': [('readonly', False)]},
          default=lambda self: self.env.user,
          )
      state = fields.Selection([('draft', 'Pending'), ('waiting',
                               'Waiting for approval'), ('approved',
                               'Approved'), ('cancel', 'Cancelled')],
                               readonly=True,
                               help='Gives the state of the attendance request modification .'
                               , default='draft')
      modification_date = fields.Date('Date')
      time_check_in_1 = fields.Datetime('Check in')
      time_check_out_1 = fields.Datetime('Check out')
      note = fields.Text('Note')
      attendance_id = fields.Many2one('hr.attendance', string='Attendance'
                                      )
  
      @api.multi
      def modification_approval(self):
          attend_signin_ids = self.env['hr.attendance'
                  ].search([('employee_id', '=', self.employee_id.id)])
          check_in_date = \
              datetime.datetime.strptime(self.time_check_in_1,
                  DEFAULT_SERVER_DATETIME_FORMAT).date()
          check_out_date = \
              datetime.datetime.strptime(self.time_check_out_1,
                  DEFAULT_SERVER_DATETIME_FORMAT).date()
          for record in self:
              attendance_check_in_date = \
                  datetime.datetime.strptime(record.attendance_id.check_in,
                      DEFAULT_SERVER_DATETIME_FORMAT).date()
              attendance_check_out_date = \
                  datetime.datetime.strptime(record.attendance_id.check_out,
                      DEFAULT_SERVER_DATETIME_FORMAT).date()
              if record.attendance_id.employee_id == self.employee_id \
                  and check_in_date == attendance_check_in_date:
                  record.attendance_id.check_in = self.time_check_in_1
                  record.attendance_id.check_out = self.time_check_out_1
          return self.write({'state': 'approved'})
  </code></pre>