From 63d32197fc2e496064c48d68ebfd43f850e19837 Mon Sep 17 00:00:00 2001 From: Henrik Norlin Date: Mon, 4 Dec 2023 10:17:20 +0100 Subject: [PATCH] [FIX] resource_booking: calendar_slot_duration format --- resource_booking/models/resource_booking_type.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/resource_booking/models/resource_booking_type.py b/resource_booking/models/resource_booking_type.py index b026c4b1..caad7631 100644 --- a/resource_booking/models/resource_booking_type.py +++ b/resource_booking/models/resource_booking_type.py @@ -128,7 +128,7 @@ def _get_combinations_priorized(self): return combinations def action_open_bookings(self): - FloatTimeParser = self.env["ir.qweb.field.float_time"] + DurationParser = self.env["ir.qweb.field.duration"] return { "context": dict( self.env.context, @@ -137,8 +137,12 @@ def action_open_bookings(self): default_duration=self.duration, default_type_id=self.id, # Context used by web_calendar_slot_duration module - calendar_slot_duration=FloatTimeParser.value_to_html( - self.slot_duration, False + calendar_slot_duration=DurationParser.value_to_html( + self.slot_duration, + { + "unit": "hour", + "digital": True, + }, ), ), "domain": [("type_id", "=", self.id)],