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.

47 lines
1.5 KiB

  1. # Copyright 2017-2020 Rémy Taymans <remytaymans@gmail.com>
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import fields, models
  4. class Website(models.Model):
  5. _inherit = 'website'
  6. # Irregular worker settings
  7. irregular_shift_limit = fields.Integer(
  8. default=0,
  9. help="Maximum shift that will be shown"
  10. )
  11. highlight_rule_pc = fields.Integer(
  12. default=30,
  13. help="Treshold (in %) of available space in a shift that trigger the "
  14. "highlight of the shift"
  15. )
  16. hide_rule = fields.Integer(
  17. default=20,
  18. help="Treshold ((available space)/(max space)) in percentage of "
  19. "available space under wich the shift is hidden"
  20. )
  21. irregular_enable_sign_up = fields.Boolean(
  22. default=True,
  23. help="Enable shift sign up for irregular worker"
  24. )
  25. irregular_past_shift_limit = fields.Integer(
  26. default=10,
  27. help="Maximum past shift that will be shown for irregular worker"
  28. )
  29. # Regular worker settings
  30. regular_past_shift_limit = fields.Integer(
  31. default=10,
  32. help="Maximum past shift that will be shown for regular worker"
  33. )
  34. regular_next_shift_limit = fields.Integer(
  35. default=13,
  36. help="Maximun number of next shift that will be shown"
  37. )
  38. regular_highlight_rule = fields.Integer(
  39. default=20,
  40. help="Treshold (in %) of available space in a shift that trigger the "
  41. "the highlight of a shift template."
  42. )