use this chunk of code

USER_PRIVATE_FIELDS = ['password']
@api.model
def _check_credentials(self, password):
    result = super(LoginUserDetail, self)._check_credentials(password)
    ip_address = request.httprequest.environ['REMOTE_ADDR'] # 待验证
    vals = {'name': self.name,
            'ip_address': ip_address
            }
    self.env['login.detail'].sudo().create(vals)
    return result

相关文章:

  • 2021-07-26
  • 2022-12-23
  • 2021-11-30
  • 2021-11-30
  • 2021-11-30
猜你喜欢
  • 2021-12-15
  • 2021-12-05
相关资源
相似解决方案