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.

51 lines
1.3 KiB

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2015 LasLabs Inc.
  3. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  4. from openerp import models, fields
  5. class ResCompany(models.Model):
  6. _inherit = 'res.company'
  7. password_expiration = fields.Integer(
  8. 'Days',
  9. default=60,
  10. help='How many days until passwords expire',
  11. )
  12. password_length = fields.Integer(
  13. 'Characters',
  14. default=12,
  15. help='Minimum number of characters',
  16. )
  17. password_lower = fields.Boolean(
  18. 'Lowercase',
  19. default=True,
  20. help='Require lowercase letters',
  21. )
  22. password_upper = fields.Boolean(
  23. 'Uppercase',
  24. default=True,
  25. help='Require uppercase letters',
  26. )
  27. password_numeric = fields.Boolean(
  28. 'Numeric',
  29. default=True,
  30. help='Require numeric digits',
  31. )
  32. password_special = fields.Boolean(
  33. 'Special',
  34. default=True,
  35. help='Require special characters',
  36. )
  37. password_history = fields.Integer(
  38. 'History',
  39. default=30,
  40. help='Disallow reuse of this many previous passwords - use negative '
  41. 'number for infinite, or 0 to disable',
  42. )
  43. password_minimum = fields.Integer(
  44. 'Minimum Hours',
  45. default=24,
  46. help='Amount of hours until a user may change password again',
  47. )