title: How should I change the method (odoov11)?
body: <p>in this method, the total holidays variable is 20, and the total_record variable is the leave, which is the annual leave, I only need to subtract the total record values ​​from the 20 values. However, if you do not add a value to total_record (that is, if the employee takes a non-annual leave), add +1 to 20.</p>
  <p>That is, a value should only be deducted from total_holidays.remaining_count if you take an annual for the type of leave used.</p>
  <p>How should I change the method to achieve this?</p>
  <pre><code>@api.multi
  @api.depends('yearly_holidays_ids')
  def _get_current_holiday_pool(self):
      for record in self:
          current_year = datetime.date.today().year
          total_holidays = record.yearly_holidays_ids.filtered(lambda lm:lm.year == current_year)
          total_record = total_holidays.mapped(&quot;holidays_ids&quot;).filtered(lambdalm:lm.holiday_status_id.name == 'annual')
          anual_leave_total = 0
          for rec in total_holidays:
             anual_leave_total += rec.remaining_count or 0
          record.current_holiday_pool = anual_leave_total
  </code></pre>
  <p>Regards,</p>
  <p>Steven</p>