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.

44 lines
1.5 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 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. default=30,
  12. help="Treshold (in %) of available space in a shift that trigger the "
  13. "highlight of the shift",
  14. )
  15. hide_rule = fields.Integer(
  16. default=20,
  17. help="Treshold ((available space)/(max space)) in percentage of "
  18. "available space under wich the shift is hidden",
  19. )
  20. irregular_enable_sign_up = fields.Boolean(
  21. default=True, help="Enable shift sign up for irregular worker"
  22. )
  23. irregular_past_shift_limit = fields.Integer(
  24. default=10,
  25. help="Maximum past shift that will be shown for irregular worker",
  26. )
  27. # Regular worker settings
  28. regular_past_shift_limit = fields.Integer(
  29. default=10,
  30. help="Maximum past shift that will be shown for regular worker",
  31. )
  32. regular_next_shift_limit = fields.Integer(
  33. default=13, help="Maximun number of next shift that will be shown"
  34. )
  35. regular_highlight_rule = fields.Integer(
  36. default=20,
  37. help="Treshold (in %) of available space in a shift that trigger the "
  38. "the highlight of a shift template.",
  39. )