[ADD] web_calendar_slot_duration: customizable calendar slots timespan

This module extends the functionality of backend calendars to support custom
slot durations and to allow you to provide more specific UX regarding event
duration and snapping.

@Tecnativa TT28201

[UPD] Update web_calendar_slot_duration.pot

[UPD] README.rst
This commit is contained in:
Jairo Llopis
2021-02-24 10:55:30 +00:00
committed by Christopher Rogos
parent f3d59726f5
commit 7fa193cf1e
12 changed files with 626 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
/* Copyright 2021 Tecnativa - Jairo Llopis
* License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */
odoo.define("web_calendar_slot_duration.CalendarModel", function (require) {
"use strict";
var CalendarModel = require("web.CalendarModel");
CalendarModel.include({
/**
* @override
*/
_getFullCalendarOptions: function () {
var result = this._super.call(this, arguments);
result.slotDuration =
this.data.context.calendar_slot_duration ||
result.slotDuration ||
"00:30:00";
return result;
},
});
});