This commit is contained in:
Bakry 2024-09-03 17:08:07 +03:00
parent 5a9efd52d8
commit b0e01b4b18
1 changed files with 6 additions and 4 deletions

View File

@ -1763,15 +1763,17 @@ class HRHolidays(models.Model):
if self.date_from:
self.date_from = fields.Datetime.from_string(self.date_from).replace(hour=0, minute=0, second=0,
microsecond=0)
if self.date_to:
self.date_to = False
self.number_of_days_temp = False
if self.holiday_status_id.include_weekend:
self.include_weekend()
self.date_on = True
self.set_date()
@api.onchange('date_from')
def _onchange_date_from_2(self):
if self.date_to:
self.date_to = False
self.number_of_days_temp = False
@api.onchange('date_to')
def _onchange_date_to(self):
""" Update the number_of_days. """