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.

46 lines
1.5 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  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, help="Maximum shift that will be shown"
  9. )
  10. highlight_rule_pc = fields.Integer(
  11. string="Percentage threshold highlight rule",
  12. default=30,
  13. help="Threshold (in %) of available space in a shift that trigger the "
  14. "highlight of the shift",
  15. )
  16. hide_rule = fields.Integer(
  17. string="Hide Rule",
  18. default=20,
  19. help="Threshold ((available space)/(max space)) in percentage of "
  20. "available space under which the shift is hidden",
  21. )
  22. irregular_enable_sign_up = fields.Boolean(
  23. default=True, 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, help="Maximun number of next shift that will be shown"
  36. )
  37. regular_highlight_rule = fields.Integer(
  38. default=20,
  39. help="Treshold (in %) of available space in a shift that trigger the "
  40. "the highlight of a shift template.",
  41. )