diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-07-25 13:27:07 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-07-27 10:59:08 +0200 |
| commit | 3d6420d4b3f062f12d7c18d7d9a976e2299b3444 (patch) | |
| tree | bce34f977c8c068296f98247b4c0e9ab7069c5f3 /addons/web/static/src/js/views/abstract_renderer.js | |
| parent | 98d3a08ebb38e5943310b5bf8e3847f0afbba02e (diff) | |
[FIX] web,*: display dashboard panel if no content
*board,crm
Before this rev., the dashboard panel (e.g. of the sales team
dashboard) wasn't displayed when there were no record to display,
whereas it should. Only the nocontent helper was displayed.
This was a bug introduced with the new view: the views' controller
was in charge to display the renderer (if there were data to
display) xor the nocontent helper. As the dashboard panel was
rendered by the renderer, it couldn't be displayed alongside the
nocontent helper.
This rev. moves this logic to the renderer. So now, the controller
always contains the renderer, which decides what to render (the
data or the nocontent helper). This way, the dashboards can display
their panel and the nocontent helper.
Diffstat (limited to 'addons/web/static/src/js/views/abstract_renderer.js')
| -rw-r--r-- | addons/web/static/src/js/views/abstract_renderer.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/abstract_renderer.js b/addons/web/static/src/js/views/abstract_renderer.js index 7d10f05eab8..d7eb5002f2d 100644 --- a/addons/web/static/src/js/views/abstract_renderer.js +++ b/addons/web/static/src/js/views/abstract_renderer.js @@ -15,11 +15,13 @@ return Widget.extend({ * @param {Widget} parent * @param {any} state * @param {Object} params + * @param {string} [params.noContentHelp] */ init: function (parent, state, params) { this._super(parent); this.state = state; this.arch = params.arch; + this.noContentHelp = params.noContentHelp; }, /** * The rendering can be asynchronous (but it is not encouraged). The start |
