[WIP]allow_negative_leave_and_allocation

This commit is contained in:
2025-10-24 10:26:34 +02:00
parent f7c7496492
commit d340a931de
6 changed files with 133 additions and 13 deletions

View File

@@ -10,7 +10,7 @@ class HrLeave(models.Model):
@api.constrains('state', 'number_of_days', 'holiday_status_id')
def _check_holidays(self):
# On ne garde que les congés qui ne permettent pas le négatif
# Keep only leaves that do not allow negative balances
to_check = self.filtered(lambda h: not h.holiday_status_id.allows_negative)
if to_check:
super(HrLeave, to_check)._check_holidays()