From 426b3d71a408e5a30ff02363256684b5e0db9dbf Mon Sep 17 00:00:00 2001 From: Pranay Date: Wed, 30 Apr 2025 18:09:11 +0530 Subject: [PATCH] Time off changes --- .../hr_timeoff_extended/models/hr_timeoff.py | 8 ++++ .../hr_timeoff_extended/views/hr_timeoff.xml | 39 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py b/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py index d39fa5741..2ccfee57d 100644 --- a/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py +++ b/addons_extensions/hr_timeoff_extended/models/hr_timeoff.py @@ -340,6 +340,14 @@ class HRLeave(models.Model): rec.submitted_date = fields.Datetime.now() self._check_validity() rec.state = 'confirm' + action = self.sudo().env.ref('hr_holidays.hr_leave_action_my') + return { + 'type': 'ir.actions.act_window', + 'name': action.name, + 'res_model': action.res_model, + 'view_mode': action.view_mode, + 'target': 'current', + } def action_reset_confirm(self): if any(holiday.state not in ['cancel', 'refuse'] for holiday in self): diff --git a/addons_extensions/hr_timeoff_extended/views/hr_timeoff.xml b/addons_extensions/hr_timeoff_extended/views/hr_timeoff.xml index 8c111abe0..1b0e81482 100644 --- a/addons_extensions/hr_timeoff_extended/views/hr_timeoff.xml +++ b/addons_extensions/hr_timeoff_extended/views/hr_timeoff.xml @@ -374,5 +374,44 @@ + + + {} + list,form,calendar,kanban,activity + + + + + + + + hr.leave.view.form.dashboard + hr.leave + + 100 + + +
+
+
+
+
+ + + + + \ No newline at end of file