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.

22 lines
785 B

  1. # Copyright 2019 Eficent Business and IT Consulting Services S.L.
  2. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
  3. from odoo import api, models
  4. class ResourceCalendar(models.Model):
  5. _inherit = 'resource.calendar'
  6. @api.multi
  7. def _get_schedule_days_iteration_limit(self):
  8. self.ensure_one()
  9. limit = self.env['ir.config_parameter'].sudo().get_param(
  10. 'resource.calendar.schedule.days.iteration.limit', default=False)
  11. return int(limit) or False
  12. @api.multi
  13. def _get_schedule_hours_iteration_limit(self):
  14. self.ensure_one()
  15. limit = self.env['ir.config_parameter'].sudo().get_param(
  16. 'resource.calendar.schedule.hours.iteration.limit', default=False)
  17. return int(limit) or False