diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-09-05 18:52:27 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-09-05 18:52:27 +0200 |
| commit | f19e6ce561b80d291cc97bf928c4b84b48ec0f59 (patch) | |
| tree | 7c5419b940876244f95d055682bbe19429ff4747 /addons/web/static/src/js/views/pivot/pivot_view.js | |
| parent | 7700bd172f790858fb4cb9e64b90c9c77d9e5b0a (diff) | |
| parent | 213759b03e5466f119f52a557d7feefb9d477267 (diff) | |
[MERGE] forward port branch 11.0 up to 213759b03e5
Diffstat (limited to 'addons/web/static/src/js/views/pivot/pivot_view.js')
| -rw-r--r-- | addons/web/static/src/js/views/pivot/pivot_view.js | 7 |
1 files changed, 7 insertions, 0 deletions
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 e0b232b6310..aa12a3324a7 100644 --- a/addons/web/static/src/js/views/pivot/pivot_view.js +++ b/addons/web/static/src/js/views/pivot/pivot_view.js @@ -43,6 +43,7 @@ var PivotView = AbstractView.extend({ var measures = {}; var groupableFields = {}; + var widgets = {}; this.fields.__count = {string: _t("Count"), type: "integer"}; _.each(this.fields, function (field, name) { @@ -64,6 +65,10 @@ var PivotView = AbstractView.extend({ name += ':' + field.attrs.interval; } + if (field.attrs.widget) { + widgets[name] = field.attrs.widget; + } + // add active measures to the measure list. This is very rarely // necessary, but it can be useful if one is working with a // functional field non stored, but in a model with an overrided @@ -94,6 +99,8 @@ var PivotView = AbstractView.extend({ this.loadParams.rowGroupBys = rowGroupBys; this.loadParams.fields = this.fields; + this.rendererParams.widgets = widgets; + this.controllerParams.title = params.title || this.arch.attrs.string || _t("Untitled"); this.controllerParams.enableLinking = !this.arch.attrs.disable_linking; this.controllerParams.measures = measures; |
