diff --git a/hr_holidays_usability/hr_holidays.py b/hr_holidays_usability/hr_holidays.py
index db1022e..5e37adc 100644
--- a/hr_holidays_usability/hr_holidays.py
+++ b/hr_holidays_usability/hr_holidays.py
@@ -24,6 +24,7 @@ from openerp.osv import orm, fields
from openerp.tools.translate import _
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, \
DEFAULT_SERVER_DATETIME_FORMAT
+from openerp.tools import float_compare
from datetime import datetime
from dateutil.relativedelta import relativedelta
import pytz
@@ -345,7 +346,8 @@ class HrHolidays(orm.Model):
False)[record.holiday_status_id.id]['remaining_leaves']
# here is the code that I modify
#if leaves_rest < record.number_of_days_temp:
- if leaves_rest < record.number_of_days * -1:
+ #if leaves_rest < record.number_of_days * -1:
+ if float_compare(leaves_rest, record.number_of_days * -1, precision_digits=2) < 0:
raise orm.except_orm(
_('Warning!'),
_('There are not enough %s allocated for '
diff --git a/hr_holidays_usability/hr_holidays_view.xml b/hr_holidays_usability/hr_holidays_view.xml
index 36f7dbc..b0c5a29 100644
--- a/hr_holidays_usability/hr_holidays_view.xml
+++ b/hr_holidays_usability/hr_holidays_view.xml
@@ -180,12 +180,25 @@ This menu entry is designed for this and only accessible to HR Manager -->
Leave Requests Force Qty
hr.holidays
- form
-
+ tree,form
{'default_type': 'remove'}
[('type','=','remove')]
+
+
+ tree
+
+
+
+
+
+
+ form
+
+
+
+