'Helper to compute the remaining leaves for the current employees
:returns dict where the key is the employee id, and the value is the remain leaves'

def _get_remaining_leaves(self):

    self._cr.execute("\n                                                SELECT\n                                                                sum(h.number_of_days)    AS    days,\n                                                                h.employee_id\n                                                FROM\n                                                                hr_holidays    h\n                                                                join    hr_holidays_status    s    ON    (s.id=h.holiday_status_id)\n                                                WHERE\n                                                                h.state='validate'    AND\n                                                                s.limit=False    AND\n                                                                h.employee_id    in    %s\n                                                GROUP    BY    h.employee_id", (tuple(self.ids),))
    return dict(((row['employee_id'], row['days']) for row in self._cr.dictfetchall()))
