[FIX] web(_diagram): set viewType on views

The attibute was correctly set on form, list and kanban views, but
not on the other ones. It wasn't really used until now, so it
wasn't a big deal.
This commit is contained in:
Aaron Bohy
2017-12-04 08:05:46 +01:00
parent c6a3f2b3b6
commit 5fd72753c6
5 changed files with 6 additions and 2 deletions
@@ -40,12 +40,12 @@ var AbstractView = Class.extend({
// multi_record is used to distinguish views displaying a single record
// (e.g. FormView) from those that display several records (e.g. ListView)
multi_record: true,
// determine if a search view should be displayed in the control panel and
// allowed to interact with the view. Currently, the only not searchable
// views are the form view and the diagram view.
searchable: true,
// viewType is the type of the view, like 'form', 'kanban', 'list'...
viewType: undefined,
config: {
Model: AbstractModel,
Renderer: AbstractRenderer,
@@ -28,6 +28,7 @@ var CalendarView = AbstractView.extend({
Controller: CalendarController,
Renderer: CalendarRenderer,
},
viewType: 'calendar',
init: function (viewInfo, params) {
this._super.apply(this, arguments);
var arch = viewInfo.arch;
@@ -32,6 +32,7 @@ var GraphView = AbstractView.extend({
Controller: Controller,
Renderer: GraphRenderer,
},
viewType: 'graph',
/**
* @override
*/
@@ -27,6 +27,7 @@ var PivotView = AbstractView.extend({
Controller: PivotController,
Renderer: PivotRenderer,
},
viewType: 'pivot',
/**
* @override
* @param {Object} params
@@ -26,6 +26,7 @@ var DiagramView = BasicView.extend({
Renderer: DiagramRenderer,
Controller: DiagramController,
},
viewType: 'diagram',
/**
* @override