'Lists the current resource\'s work days between the two provided
dates (inclusive).
Work days are the company or service\'s open days (as defined by the
resource.calendar) minus the resource\'s own leaves.
:param datetime.date from_date: start of the interval to check for
work days (inclusive)
:param datetime.date to_date: end of the interval to check for work
days (inclusive)
:rtype: list(datetime.date)'

def _iter_work_days(self, from_date, to_date):

    working_intervals = self.calendar_id.get_working_intervals_of_day
    for dt in rrule.rrule(rrule.DAILY, dtstart=from_date, until=to_date):
        intervals = working_intervals(dt, compute_leaves=True, resource_id=self.id)
        if (intervals and intervals[0]):
            (yield dt.date())
