Browse files

[FIX] hr_holidays: fix refusing multiple leaves

wrong use of self in loop, should've been holiday.
  • Loading branch information...
1 parent 942d8a2 commit 0a989d65326dc2d66d56b063c368624fd07534fc @Icallhimtest Icallhimtest committed Feb 17, 2017
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/hr_holidays/models/
@@ -504,7 +504,7 @@ def action_refuse(self):
manager = self.env['hr.employee'].search([('user_id', '=', self.env.uid)], limit=1)
for holiday in self:
- if self.state not in ['confirm', 'validate', 'validate1']:
+ if holiday.state not in ['confirm', 'validate', 'validate1']:
raise UserError(_('Leave request must be confirmed or validated in order to refuse it.'))
if holiday.state == 'validate1':

0 comments on commit 0a989d6

Please sign in to comment.