Hi,
perhaps :
menu settings/configuration/sales
check box to True for "Allow using different units of measures" and apply
now, in menu sales/configuration you will have a new section "units of measure".
click on this section and you will have days and hours as "working time category".
days is the unit of reference, and hours lower than the unit of reference (warning, just configure one unit of reference by category, there was a bug with this in 6.0, but now ???)
then to compare unit of reference and other (smaller or biggert than unit of reference), use ratio value.
Update :
I'm looking hr holidays code, the problem comes from 2 functions onchange_date_from and onchange_date_to.
In the first if you add value only in date_from, value returned is 8 hours, with working time unit of measure this will correspond to one day (see the ratio days/hours).
if there is date_from and date_to, this will return :
diff_day = self._get_number_of_days(date_from, date_to)
result['value']['number_of_days_temp'] = round(math.floor(diff_day))+1
here round will convert float to integer with 0 as result for 4 hours, that's why it is add + 1 after round function. This is strange because number_of days has type float ...
I think this is an error ....
Update 2 :
solution here could be, but to test result (not done), by adding 2 decimals to the result :
result['value']['number_of_days_temp'] = round(math.floor(diff_day), 2)
perhaps verify the rest of the code too and just add filter cases for 1/4 day, 1/2 day, 3/4 day.
Hoping that solves your problem.
Bye