Merge pull request #991 from expsa/bakry_hr

fix
This commit is contained in:
bakry 2024-09-03 17:10:35 +03:00 committed by GitHub
commit 2d007da555
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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. """