You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
642 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2016 LasLabs Inc.
  3. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  4. from odoo import fields, models
  5. class ResUsersPassHistory(models.Model):
  6. _name = 'res.users.pass.history'
  7. _description = 'Res Users Password History'
  8. _order = 'user_id, date desc'
  9. user_id = fields.Many2one(
  10. string='User',
  11. comodel_name='res.users',
  12. ondelete='cascade',
  13. index=True,
  14. )
  15. password_crypt = fields.Char(
  16. string='Encrypted Password',
  17. )
  18. date = fields.Datetime(
  19. default=lambda s: fields.Datetime.now(),
  20. index=True,
  21. )