Extending CalendarView breaks default Calendar

It seems that extending the CalendarView.prototype.config changes the renderer in the default Calendar view and then you always get a list view instead of the default calendar.
pull/2235/head
Martronic SA 2021-09-23 10:24:28 +02:00 committed by Olga Marco
parent 2676bc7c07
commit 14928cb76a
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
odoo.define("web_view_calendar_list.CalendarListView", function(require) {
"use strict";
var AbstractView = require("web.AbstractView");
var CalendarView = require("web.CalendarView");
var core = require("web.core");
var CalendarListController = require("web_view_calendar_list.CalendarListController");
@ -13,8 +14,8 @@ odoo.define("web_view_calendar_list.CalendarListView", function(require) {
var CalendarListView = CalendarView.extend({
display_name: _lt("Calendar List"),
icon: "fa-calendar-check-o",
viewType: 'calendar_list',
config: _.extend(CalendarView.prototype.config, {
viewType: "calendar_list",
config: _.extend(AbstractView.prototype.config, {
Model: CalendarListModel,
Controller: CalendarListController,
Renderer: CalendarListRenderer,