Skip to content

Commit

Permalink
[FIX] resource_booking: calendar_slot_duration format
Browse files Browse the repository at this point in the history
  • Loading branch information
norlinhenrik committed Dec 4, 2023
1 parent 51cac6b commit 63d3219
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions resource_booking/models/resource_booking_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)],
Expand Down

0 comments on commit 63d3219

Please sign in to comment.