diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-11-24 08:46:12 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-12-04 08:05:46 +0100 |
| commit | 5fd72753c632b76b97a3653f3ad2bafa0e2cd7f3 (patch) | |
| tree | 8163e59a56c3672818575047ffe37112e2b06673 /addons/web/static/src | |
| parent | c6a3f2b3b66502e03e493cff6c301b3c38c74306 (diff) | |
[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.
Diffstat (limited to 'addons/web/static/src')
4 files changed, 5 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/abstract_view.js b/addons/web/static/src/js/views/abstract_view.js index 7fb2141db35..2a1ba16a33e 100644 --- a/addons/web/static/src/js/views/abstract_view.js +++ b/addons/web/static/src/js/views/abstract_view.js @@ -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, diff --git a/addons/web/static/src/js/views/calendar/calendar_view.js b/addons/web/static/src/js/views/calendar/calendar_view.js index 7f58ca55632..628ad8d0380 100644 --- a/addons/web/static/src/js/views/calendar/calendar_view.js +++ b/addons/web/static/src/js/views/calendar/calendar_view.js @@ -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; diff --git a/addons/web/static/src/js/views/graph/graph_view.js b/addons/web/static/src/js/views/graph/graph_view.js index a5ad21e1816..44e1f74e8da 100644 --- a/addons/web/static/src/js/views/graph/graph_view.js +++ b/addons/web/static/src/js/views/graph/graph_view.js @@ -32,6 +32,7 @@ var GraphView = AbstractView.extend({ Controller: Controller, Renderer: GraphRenderer, }, + viewType: 'graph', /** * @override */ diff --git a/addons/web/static/src/js/views/pivot/pivot_view.js b/addons/web/static/src/js/views/pivot/pivot_view.js index 7e4dddc4a52..fbafd0e867c 100644 --- a/addons/web/static/src/js/views/pivot/pivot_view.js +++ b/addons/web/static/src/js/views/pivot/pivot_view.js @@ -27,6 +27,7 @@ var PivotView = AbstractView.extend({ Controller: PivotController, Renderer: PivotRenderer, }, + viewType: 'pivot', /** * @override * @param {Object} params |
