From 1979098602593ed76777d8b6341cde5484b70510 Mon Sep 17 00:00:00 2001 From: blackbelts <74664702+eslamtalaat74@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:19:08 +0300 Subject: [PATCH] change leaves_balancee_action --- .../models/hr_official_mission.py | 6 ++--- .../views/leaves_balance.xml | 23 ++++++++----------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/odex25_hr/exp_official_mission/models/hr_official_mission.py b/odex25_hr/exp_official_mission/models/hr_official_mission.py index 6dd69a884..d669d94f2 100644 --- a/odex25_hr/exp_official_mission/models/hr_official_mission.py +++ b/odex25_hr/exp_official_mission/models/hr_official_mission.py @@ -105,12 +105,10 @@ class HrOfficialMission(models.Model): @api.depends('hour_duration', 'date_duration') - def compute_number_of_hours(self): for item in self: - if item.hour_duration and item.date_duration: - - item.total_hours = item.hour_duration * item.date_duration + # if item.hour_duration and item.date_duration: + item.total_hours = item.hour_duration * item.date_duration diff --git a/odex25_hr/hr_holidays_public/views/leaves_balance.xml b/odex25_hr/hr_holidays_public/views/leaves_balance.xml index 4ef6fc93a..80ec11120 100644 --- a/odex25_hr/hr_holidays_public/views/leaves_balance.xml +++ b/odex25_hr/hr_holidays_public/views/leaves_balance.xml @@ -36,20 +36,15 @@ - - - - - - - - - - - - - - + + Leaves Balance + hr.holidays + tree,form + [('type','=','add'),('check_allocation_view','=','balance')] + {'default_type':'add', 'default_check_allocation_view': 'balance'} + + +